Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Firefox 63
Windows
Desktop
5 years ago
Test name Executions per second
indexOf first 144697072.0 Ops/sec
$.inArray first 21366904.0 Ops/sec
indexOf last 1222079.8 Ops/sec
$.inArray last 1161379.9 Ops/sec
indexOf middle 2380813.8 Ops/sec
$.inArray middle 2188547.0 Ops/sec
indexOf 804548.1 Ops/sec
$.inArray 734494.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;