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 30706360.0 Ops/sec
val in array small 110767896.0 Ops/sec
[].includes large beginning 29101514.0 Ops/sec
val in array large beginning 111070728.0 Ops/sec
[].ncludes large end 98366.8 Ops/sec
val in array large end 110487064.0 Ops/sec
_.includes large 115401.4 Ops/sec
indexOf smallArray 38506988.0 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


;