Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36
Chrome 101
Linux
Desktop
2 years ago
Test name Executions per second
indexOf first 6826645.0 Ops/sec
$.inArray first 1816825.9 Ops/sec
indexOf last 1295286.0 Ops/sec
$.inArray last 272257.6 Ops/sec
indexOf middle 2295664.5 Ops/sec
$.inArray middle 458485.0 Ops/sec
indexOf 787459.2 Ops/sec
$.inArray 161058.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;