Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Array.prototype.concat vs spread operator vs flat
Compare the new ES6 spread operator with the traditional concat() method
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 15; ASUS_AI2302 Build/AQ3A.240812.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/136.0.7103.60 Mobile Safari/537.36
Browser:
Chrome Mobile 136
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Benchmark engine:
Benchmark.js
spread operator
25.7M/s
Array.prototype.concat
6.3M/s
Array.prototype.flat
3.0M/s
View exact numbers
Test name
Executions per second
✓
spread operator
25,661,734 Ops/sec
Array.prototype.concat
6,281,264 Ops/sec
Array.prototype.flat
2,989,285 Ops/sec
Tests:
Array.prototype.concat
var params = [ "hello", true, 7 ]; var other = [ 1, 2 ].concat(params);
spread operator
var params = [ "hello", true, 7 ] var other = [ 1, 2, ...params ]
Array.prototype.flat
var params = [ "hello", true, 7 ]; var other = [1, 2, params].flat()