Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
Firefox 62
Windows 7
Desktop
6 years ago
Test name Executions per second
[].includes small 32761438.0 Ops/sec
[].includes large beginning 29894298.0 Ops/sec
[].ncludes large end 100912.7 Ops/sec
_.includes large end 120657.9 Ops/sec
indexOf smallArray 38122668.0 Ops/sec
indexOf largeArray beginning 34865488.0 Ops/sec
indexOf largeArray end 123177.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • [].includes small

  • [].includes large beginning

  • [].ncludes large end

  • _.includes large end

  • indexOf smallArray

  • indexOf largeArray beginning

  • indexOf largeArray end


;