Array.prototype.slice vs spread operator 123
Compare the new ES6 spread operator with the traditional slice() method
5 years ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
Test name |
Executions per second |
Array.prototype.slice |
1906630.8 Ops/sec |
spread operator |
836818.2 Ops/sec |
Tests:
-
Array.prototype.slice
-
spread operator
Open this result on MeasureThat.net