Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.prototype.concat vs spread oper
(version: 1)
Compare the new ES6 spread operator with the traditional concat() method
Comparing performance of:
Array.prototype.concat vs spread operator
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
let big = (new Array(1e5)).fill(99);
Tests:
Array.prototype.concat
var other = big.concat(2);
spread operator
var other = [ ...big, 2 ]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.prototype.concat
spread operator
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.prototype.concat
4059.2 Ops/sec
spread operator
2779.0 Ops/sec
Related benchmarks:
concat 2 arrays: Array.prototype.concat vs spread operator
ES6 Array concat vs spread operator
Array.prototype.concat vs spread operator v6
Array.prototype.concat / spread operator
Array.prototype.concat vs spread operator (add)
Array.prototype.concat vs spread operator (new try)
Array.prototype.concat vs spread operator (fix)
Array.prototype.concat vs spread operator on large array
Array.prototype.concat vs spread operator on small array
Comments
Confirm delete:
Do you really want to delete benchmark?