Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36
Chrome 79
Windows
Desktop
4 years ago
Test name Executions per second
Array.prototype.slice -- long -- no additions 4671.5 Ops/sec
spread operator -- long -- no additions 4620.2 Ops/sec
Array.prototype.slice -- long -- add another 2192.3 Ops/sec
spread operator -- long -- add another 1206.0 Ops/sec
Array.prototype.slice -- short -- no additions 11114719.0 Ops/sec
spread operator -- short -- no additions 10191025.0 Ops/sec
Array.prototype.slice -- short -- add a few 3329287.2 Ops/sec
spread operator -- short -- add a few 7674154.5 Ops/sec
Script Preparation code:
Tests:
  • Array.prototype.slice -- long -- no additions

  • spread operator -- long -- no additions

  • Array.prototype.slice -- long -- add another

  • spread operator -- long -- add another

  • Array.prototype.slice -- short -- no additions

  • spread operator -- short -- no additions

  • Array.prototype.slice -- short -- add a few

  • spread operator -- short -- add a few


;