Run details:
Mozilla/5.0 (Linux; Android 6.0; Lenovo TAB 2 A10-70F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.119 Safari/537.36
Chrome 80
Android 6.0
Desktop
4 years ago
Test name Executions per second
indexOf first 1436486.8 Ops/sec
$.inArray first 403881.9 Ops/sec
indexOf last 1133436.5 Ops/sec
$.inArray last 82822.3 Ops/sec
indexOf middle 1434746.6 Ops/sec
$.inArray middle 135261.4 Ops/sec
indexOf 486197.3 Ops/sec
$.inArray 47494.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;