Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Firefox/68.0
Firefox 68
Windows
Desktop
4 years ago
Test name Executions per second
indexOf first 191606592.0 Ops/sec
$.inArray first 16220083.0 Ops/sec
indexOf last 1153085.9 Ops/sec
$.inArray last 1066773.5 Ops/sec
indexOf middle 2177508.8 Ops/sec
$.inArray middle 2012383.9 Ops/sec
indexOf 759498.6 Ops/sec
$.inArray 625488.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray