Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 11651165.0 Ops/sec
$.inArray first 3417977.5 Ops/sec
indexOf last 11799104.0 Ops/sec
$.inArray last 2132474.2 Ops/sec
indexOf middle 11750753.0 Ops/sec
$.inArray middle 2568079.5 Ops/sec
indexOf 3954160.8 Ops/sec
$.inArray 865742.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;