Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 11883482.0 Ops/sec
$.inArray first 3503459.2 Ops/sec
indexOf last 11823451.0 Ops/sec
$.inArray last 2213347.0 Ops/sec
indexOf middle 11887131.0 Ops/sec
$.inArray middle 2700682.0 Ops/sec
indexOf 4017237.2 Ops/sec
$.inArray 902137.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;