Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.prototype.concat vs push w/ spread operator vs spread operator
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; arm_64; Android 12; MNA-LX9) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.7339.122 YaBrowser/25.10.1.122.00 SA/3 Mobile Safari/537.36
Browser:
Yandex Browser 25
Operating system:
Android
Device Platform:
Mobile
Date tested:
5 months ago
Test name
Executions per second
Array.prototype.concat
7542471.5 Ops/sec
push with spread operator
24911214.0 Ops/sec
spread operator
16170172.0 Ops/sec
Tests:
Array.prototype.concat
var arr1 = [ 1,2,3,4,5,6,7,8,9,10 ]; var arr2 = [ 1,2,3,4,5,6,7,8,9,10 ]; var newArr = arr1.concat(arr2);
push with spread operator
var arr1 = [ 1,2,3,4,5,6,7,8,9,10 ]; var arr2 = [ 1,2,3,4,5,6,7,8,9,10 ]; var newArr = arr1.push(...arr2);
spread operator
var arr1 = [ 1,2,3,4,5,6,7,8,9,10 ]; var arr2 = [ 1,2,3,4,5,6,7,8,9,10 ]; var newArr = [...arr1, ...arr2];