Vyacheslav Egorov (2013-10-30T22:11:15.000Z)
domenic at domenicdenicola.com (2013-11-03T22:22:20.824Z)
Yes, all API variants I have proposed should result in the equivalent performance, to the best of my knowledge. I would even say that {lo, hi} one is easier on VMs for two reasons: - VMs tend to have some sort of escape analysis / allocation sinking and they can incorporate { lo, hi } support into this pass; - If VM desires to allocate { lo, hi } value to a single register it might be easier to do that when values are explicitly grouped, VM does not have to rediscover pairing --- it is already there. You also correctly reasoned that I proposed magic property API for the purposes of faster polyfilling. So given the choice between { lo, hi } and magical property API if I would prefer { lo, hi } iff I ignore polyfill performance. > The other main use case I can think of is large compiled C++ codebases I saw crypto libraries (e.g. NaCl) heavily relying on 64bit arithmetic. > Are there any other use cases you have in mind that really demand high polyfill performance? I am interested in the whole number hierarchy actually (int32 - int64 - bigint). But I have no clear idea what to do here. One possibility would be to allow passing type arrays alongside with primitive numbers into something `Math.big<op>`. But this is pretty ugly and probably also results in abysmal polyfill performance.