Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Firefox 69
Linux
Desktop
5 years ago
Test name Executions per second
indexOf first 177919280.0 Ops/sec
$.inArray first 21466228.0 Ops/sec
indexOf last 1158881.4 Ops/sec
$.inArray last 1110244.0 Ops/sec
indexOf middle 2322709.8 Ops/sec
$.inArray middle 2080087.6 Ops/sec
indexOf 781136.2 Ops/sec
$.inArray 715649.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;