Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Windows
Desktop
27 days ago
Test name Executions per second
indexOf first 59556632.0 Ops/sec
$.inArray first 32556542.0 Ops/sec
indexOf last 5532512.0 Ops/sec
$.inArray last 5146355.0 Ops/sec
indexOf middle 9701486.0 Ops/sec
$.inArray middle 8415840.0 Ops/sec
indexOf 3515436.2 Ops/sec
$.inArray 3107467.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray