3 ms·
The demo page basically shows this is pointless practically - and sometimes _slower_. These kind of optimizations were very useful in hot paths even just a few
by abritinthebay 9y ago
The demo page basically shows this is pointless practically - and sometimes _slower_.
These kind of optimizations were very useful in hot paths even just a few years ago. However browser engines have optimized functional patterns (what this mostly rewrites) to be within absolute microseconds of imperative versions.
In some cases it can even make useful assumptions in an FP method (immutability, etc) that it can't in the standard loops - which is why sometimes this is slower.
Long story short: concentrate on shipping less JavaScript and good practical solutions/algorithms and not stuff like this.