It's fairly well-known that Array#forEach is up to an order of magnitude slower than a for-loop, across browsers. The usual reason given is the overhead of invoking a closure from the VM. A JS implementation of forEach ought to be somewhere in the middle.
The speed-up for "concat" is surprising to me. I wonder if it holds for "splice" and if that is true across browsers.
The speed-up for "concat" is surprising to me. I wonder if it holds for "splice" and if that is true across browsers.