loading...

re: Javascript Array.push is 945x faster than Array.concat 🤯🤔 VIEW POST

FULL DISCUSSION
 

0x0.st/zTak.png

I actually got the opposite results. This must only hold true for the V8 engine.

 

Actually, that's not the same tests, because for the concat test in your screenshot, arr1 is not being assigned the result of arr1.concat(arr2) so it never increases in size. Instead arr3 is being assigned the result. It's not merging 10,000 arrays to a single array, but instead it is just running concat on arrays of the same size 10,000 times.

code of conduct - report abuse