Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
javascript concat vs spread operator vs push
javascript concat vs spread operator vs push
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 120
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
push
69.9M/s
spread operator
38.4M/s
concat
11.8M/s
View exact numbers
Test name
Executions per second
✓
push
69,852,456 Ops/sec
spread operator
38,442,332 Ops/sec
concat
11,826,721 Ops/sec
Tests:
concat
var existed = [ 1, 2, 3 ]; var params = [ "hello", true, 7 ]; var other = existed.concat(params);
spread operator
var existed = [ 1, 2, 3 ]; var params = [ "hello", true, 7 ]; var other = [ ...existed, ...params ];
push
var existed = [ 1, 2, 3 ]; var params = [ "hello", true, 7 ]; var other = existed.push(...params);