Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Firefox 60
Windows 7
Desktop
6 years ago
Test name Executions per second
indexOf first 30454260.0 Ops/sec
$.inArray first 5348689.5 Ops/sec
indexOf last 333925.3 Ops/sec
$.inArray last 334817.9 Ops/sec
indexOf middle 682403.1 Ops/sec
$.inArray middle 613652.7 Ops/sec
indexOf 243368.2 Ops/sec
$.inArray 189890.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;