spread vs concat vs unshift vs push
There was also push.apply, but the browsers kept running out of memory for those tests. It worked only once. Here's a comparison with just the push results:
arrayPush 4763922.0 Ops/sec
arrayPush.apply 2666974.0 Ops/sec
Comparing performance of: arrayUnshift vs arrayConcat vs arraySpread vs arrayPush
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
arrayUnshift
arrayConcat
arraySpread
arrayPush
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.99 Safari/537.36 Vivaldi/2.9.1705.41