Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array.prototype.slice vs spread operator large arrays
(version: 1)
Compare the new ES6 spread operator with the traditional slice() method
Comparing performance of:
Array.prototype.slice large vs spread operator large
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
Array.prototype.slice large
var params = Array.from({length: 10000}, () => 1) var other = params.slice();
spread operator large
var params = Array.from({length: 10000}, () => 1) var other = [ ...params ]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.prototype.slice large
spread operator large
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/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Array.prototype.slice large
5K/s
spread operator large
5K/s
View exact numbers
Test name
Executions per second
✓
Array.prototype.slice large
4,780 Ops/sec
spread operator large
4,718 Ops/sec
Related benchmarks
Array.prototype.slice vs spread operator With slightly bigger array
Array.prototype.slice vs spread operator by sean
Array.prototype.slice vs spread operator (better though)
Comments
Confirm delete:
Do you really want to delete benchmark?