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 7409827.5 Ops/sec
$.inArray first 2262022.0 Ops/sec
indexOf last 7352338.5 Ops/sec
$.inArray last 1425139.1 Ops/sec
indexOf middle 7709009.5 Ops/sec
$.inArray middle 1705322.1 Ops/sec
indexOf 2522726.2 Ops/sec
$.inArray 607339.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;