Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0
Firefox 70
Windows
Desktop
5 years ago
Test name Executions per second
indexOf first 132464168.0 Ops/sec
$.inArray first 14098829.0 Ops/sec
indexOf last 1052687.4 Ops/sec
$.inArray last 955288.1 Ops/sec
indexOf middle 1863218.0 Ops/sec
$.inArray middle 1615153.8 Ops/sec
indexOf 657738.3 Ops/sec
$.inArray 580634.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;