Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
js spread vs concat vs push
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:152.0) Gecko/20100101 Firefox/152.0
Browser:
Firefox 152
Operating system:
Windows
Device Platform:
Desktop
Date tested:
6 days ago
Test name
Executions per second
concat
23754834.0 Ops/sec
spread
26603556.0 Ops/sec
push
30455260.0 Ops/sec
Tests:
concat
var params = [ "hello", true, 7 ]; var other = [ 1, 2 ].concat(params);
spread
var params = [ "hello", true, 7 ]; var other = [ 1, 2, ...params ];
push
var params = [ "hello", true, 7 ]; var other = [ 1, 2 ].push(...params);