Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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
Test name
Executions per second
Array.prototype.concat
6281264.5 Ops/sec
spread operator
25661734.0 Ops/sec
Array.prototype.flat
2989285.2 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()