Slice vs Spread Operator Test
Compare the new ES6 spread operator with the traditional slice() method
one year ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.115 Safari/537.36
Test name |
Executions per second |
Array.prototype.slice |
181913800.0 Ops/sec |
spread operator |
111536700.0 Ops/sec |
Tests:
-
Array.prototype.slice
-
spread operator
Open this result on MeasureThat.net