Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
spread vs push vs unshift
Compare the new ES6 spread operator with the traditional concat() method and push
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser:
Chrome 133
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
push
73.8M/s
spread
48.1M/s
unshift
23.0M/s
View exact numbers
Test name
Executions per second
✓
push
73,840,808 Ops/sec
spread
48,102,764 Ops/sec
unshift
22,981,824 Ops/sec
Tests:
spread
var params = [ "hello", true, 7 ]; params = [ ...params, "444"];
push
var params = [ "hello", true, 7 ] params.push("444");
unshift
var params = [ "hello", true, 7 ] params.unshift("444");