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
Jump 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
Test name
Executions per second
Array.prototype.slice large
4780.3 Ops/sec
spread operator large
4718.1 Ops/sec
Related benchmarks:
Array.prototype.slice vs spread operator 2
Array.prototype.slice vs spread operator with length limit
Array.prototype.slice vs spread operator for number only array
Array.prototype.slice vs spread operator With slightly bigger array
Array.prototype.slice vs spread operator copy performance
Which is faster Array.prototype.slice vs spread operator
Array.prototype.slice vs spread operator test
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?