Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0
Firefox 60
Windows
Desktop
6 years ago
Test name Executions per second
indexOf first 121790072.0 Ops/sec
$.inArray first 10978652.0 Ops/sec
indexOf last 1127734.1 Ops/sec
$.inArray last 1039273.6 Ops/sec
indexOf middle 1998994.1 Ops/sec
$.inArray middle 1960569.0 Ops/sec
indexOf 712370.1 Ops/sec
$.inArray 653856.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;