2 ms·
I 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
by DanielHB 3y ago
I 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.