4 ms·
I'd be particularly curious regarding what the optimized version yields for "fibonacci(78)" - plain JS will get this one wrong, as it runs out of mantissa bits
by al2o3cr 10y ago
I'd be particularly curious regarding what the optimized version yields for "fibonacci(78)" - plain JS will get this one wrong, as it runs out of mantissa bits and gives 14472334024676220 instead of the correct 14472334024676221.
Doing an asm.js-style transformation to use machine integers would offer some speedup, but the behavior would differ due to 64-bit integers vs 53-bit.