Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 64768884.0 Ops/sec
$.inArray first 19166024.0 Ops/sec
indexOf last 881759.1 Ops/sec
$.inArray last 822269.9 Ops/sec
indexOf middle 1687007.6 Ops/sec
$.inArray middle 1601768.5 Ops/sec
indexOf 610515.3 Ops/sec
$.inArray 567365.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;