3 ms·
I have no idea, but I suppose when every integer is effectively a bignum, there’s plenty of room for optimization.
by macintux 4y ago
I have no idea, but I suppose when every integer is effectively a bignum, there’s plenty of room for optimization.
- di4na 4y agoFunnily enough... It is really hard if not impossible to optimise when everything is bignum.
- titzer 4y agoWhile JavaScript didn't have BigInt until a couple years ago, it did start with all numbers being floats. JSVMs optimize heavily for the small integer (SMI) case. They do both dynamic profiling, speculative optimization, and significant type analysis to get very good code for the SMI cases.
- di4na 4y agoyou realise floats are far easier because in any case you are limited to 64 bits and you know that?
- Joker_vD 4y agoYeah, just look at Scheme or any other Lisp!