Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Windows
Desktop
one year ago
Test name Executions per second
arr 100 (includes) 18693386.0 Ops/sec
arr 100 (indexOf) 14525659.0 Ops/sec
set 100 18745408.0 Ops/sec
arr 10000 (includes) 16017806.0 Ops/sec
arr 10000 (indexOf) 959260.0 Ops/sec
set 10000 18745486.0 Ops/sec
arr 1000000 (includes) 63135.5 Ops/sec
arr 1000000 (indexOf) 63340.3 Ops/sec
set 1000000 18802742.0 Ops/sec
Script Preparation code:
Tests:
  • arr 100 (includes)

  • arr 100 (indexOf)

  • set 100

  • arr 10000 (includes)

  • arr 10000 (indexOf)

  • set 10000

  • arr 1000000 (includes)

  • arr 1000000 (indexOf)

  • set 1000000


;