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 13584935.0 Ops/sec
$.inArray first 3703065.2 Ops/sec
indexOf last 13795684.0 Ops/sec
$.inArray last 2238863.2 Ops/sec
indexOf middle 13580602.0 Ops/sec
$.inArray middle 2748610.0 Ops/sec
indexOf 4634754.5 Ops/sec
$.inArray 920579.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;