4 ms·
Just curious, how did you run integer math in JS to compare? Since it doesn't support it natively.
by jrajav 3y ago
Just curious, how did you run integer math in JS to compare? Since it doesn't support it natively.
- DanielHB 3y agoI wrote a few test cases in both JS and C doing some computations inside a loop. The code between the versions was equivalent and not micro-optimized. In JS was using normal variables so they were stored in memory as IEEE754 (unless the engine was doing some optimisations I was not aware of). So no manual binary math with buffers in JS I was specifically looking how big of an impact it is to use normal JS numbers for integer-heavy math. It turns out it is quite big, but for float64 math, not so much.