3 ms·
ASM and C have access to native 64-bit integers. Javascript does not.
by Taywee 4y ago
ASM and C have access to native 64-bit integers. Javascript does not.
- shakna 4y agoJavascript does [0]. Shipping in Chrome v67, and rolling out elsewhere. [0] https://chromestatus.com/feature/5371603852460032 https://chromestatus.com/feature/5371603852460032
- Taywee 4y agoThat's not native 64-bit integers. That's BigInt, and it's already out everywhere, and unless the situation has changed, it's significantly slower than just 64-bit integers would be. I'm not actually attacking JavaScript for this, note. I don't think it's really all that much of a problem given the purposes of JavaScript, and I think it could really be better fixed by doing something similar to what Lua did, and have all numbers transparently either a 64-bit floating point number or a 64-bit signed integer. If you are using JavaScript and something like specifically needing 64-bit integers is an issue for you, there's a good chance you should just be using WebAssembly.
- nailer 4y agoI suspect the parent thought 'native' meant 'inbuilt 64 bit integers' and you thought 'native' meant '64 bit integers in C'.