Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 14614276.0 Ops/sec
$.inArray first 4507228.0 Ops/sec
indexOf last 14794006.0 Ops/sec
$.inArray last 2758842.2 Ops/sec
indexOf middle 14778827.0 Ops/sec
$.inArray middle 3381383.5 Ops/sec
indexOf 5063548.5 Ops/sec
$.inArray 1149894.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;