Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 OPR/102.0.0.0
Opera 102
Windows
Desktop
one year ago
Test name Executions per second
Array.prototype.slice - 10k Numbers 958421.9 Ops/sec
spread operator - 10k Numbers 667783.8 Ops/sec
Array.prototype.slice - 10k Strings 789646.8 Ops/sec
spread operator - 10k Strings 954740.6 Ops/sec
Script Preparation code:
Tests:
  • Array.prototype.slice - 10k Numbers

  • spread operator - 10k Numbers

  • Array.prototype.slice - 10k Strings

  • spread operator - 10k Strings