Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox 91
Windows
Desktop
3 years ago
Test name Executions per second
indexOf first 44337908.0 Ops/sec
$.inArray first 9282903.0 Ops/sec
indexOf last 273593.8 Ops/sec
$.inArray last 279077.1 Ops/sec
indexOf middle 560437.7 Ops/sec
$.inArray middle 531519.0 Ops/sec
indexOf 184154.8 Ops/sec
$.inArray 170602.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;