Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.prototype.concat vs spread operator v5
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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 YaBrowser/24.4.0.0 Safari/537.36
Browser:
Yandex Browser 24
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Array.prototype.concat
8289534.0 Ops/sec
spread operator
26244286.0 Ops/sec
Tests:
Array.prototype.concat
var array = [ "hello", true, 7 ]; var params = [ "goodbye", false, 8 ]; var extraParams = [ "another one", null, 9 ]; var merged = array.concat(params,extraParams);
spread operator
var array = [ "hello", true, 7 ]; var params = [ "goodbye", false, 8 ]; var extraParams = [ "another one", null, 9 ]; var merged = [...array, ...params , ...extraParams];