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


You got it wrong in the benchmark.
Pushing an array is 1 item change on the array.
Pushing [...arr] is different. not x1K faster.


I'm sorry, not quite sure what you mean. Could you explain which part you are referring to and why it's incorrect?


It is not obvious that :
.bind(objthis)(arg1,arg2) == .call(objthis,arg1,arg2) == .apply(objthis,[arg1,arg2])

Also, Array.push accepts multiples values : myarray.push(value1,value2,value3)

code of conduct - report abuse