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 159136448.0 Ops/sec
$.inArray first 20901752.0 Ops/sec
indexOf last 1518913.2 Ops/sec
$.inArray last 1424612.1 Ops/sec
indexOf middle 2918710.2 Ops/sec
$.inArray middle 2640567.8 Ops/sec
indexOf 992199.8 Ops/sec
$.inArray 882701.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray