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:
8 months ago
push with spread operator
24.9M/s
spread operator
16.2M/s
Array.prototype.concat
7.5M/s
View exact numbers
Test name
Executions per second
✓
push with spread operator
24,911,214 Ops/sec
spread operator
16,170,172 Ops/sec
Array.prototype.concat
7,542,472 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];