2 ms·
Maybe because of javascript, where all numbers are floats?
by ric2b 6y ago
Maybe because of javascript, where all numbers are floats?
- hajile 6y agoNot strictly true. Taking a loop and adding a bunch of `x|0` can also often boost performance by hinting that integers are fine (in fact, the JIT is free to do this anyway if detects that it can). The most recent spec is also adding BigInt. Additionally, integer typed arrays have existed since the 1.0 release in 2011 (I believe they were even seeing work as early as 2006 or so with canvas3D).