Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 21241130.0 Ops/sec
$.inArray first 5955856.5 Ops/sec
indexOf last 21231326.0 Ops/sec
$.inArray last 2855320.5 Ops/sec
indexOf middle 16871628.0 Ops/sec
$.inArray middle 2972773.2 Ops/sec
indexOf 5256450.5 Ops/sec
$.inArray 1333673.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;