Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0
Firefox 77
Windows
Desktop
4 years ago
Test name Executions per second
indexOf first 162352592.0 Ops/sec
$.inArray first 74519512.0 Ops/sec
indexOf last 1104597.5 Ops/sec
$.inArray last 1163514.0 Ops/sec
indexOf middle 2088770.0 Ops/sec
$.inArray middle 2172390.8 Ops/sec
indexOf 675098.8 Ops/sec
$.inArray 689205.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;