3 ms·
Interesting that reduce and forEach have about the same performance, suggesting the overhead is in the function invocation, no matter whether it needs to close
by ajanuary 13y ago
Interesting that reduce and forEach have about the same performance, suggesting the overhead is in the function invocation, no matter whether it needs to close over variables or not. I would have thought not closing over variables would be substantially quicker.