Array.prototype.slice(0) vs spread operator 99999
Compare the new ES6 spread operator with the traditional slice(0) method
4 years ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15
Test name |
Executions per second |
Array.prototype.slice |
7067.3 Ops/sec |
spread operator |
3976.5 Ops/sec |
Tests:
-
Array.prototype.slice
-
spread operator
Open this result on MeasureThat.net