Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.63
Chrome 110
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 20180384.0 Ops/sec
$.inArray first 5693430.0 Ops/sec
indexOf last 20175878.0 Ops/sec
$.inArray last 1026470.6 Ops/sec
indexOf middle 18881888.0 Ops/sec
$.inArray middle 1723548.1 Ops/sec
indexOf 6386639.5 Ops/sec
$.inArray 577412.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray