Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0
Firefox 63
Windows
Desktop
6 years ago
Test name Executions per second
indexOf first 153868784.0 Ops/sec
$.inArray first 19068394.0 Ops/sec
indexOf last 872558.0 Ops/sec
$.inArray last 894266.1 Ops/sec
indexOf middle 1776459.8 Ops/sec
$.inArray middle 1709371.4 Ops/sec
indexOf 581779.2 Ops/sec
$.inArray 625102.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;