Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Windows
Desktop
one year ago
Test name Executions per second
indexOf first 25000480.0 Ops/sec
$.inArray first 8194239.5 Ops/sec
indexOf last 24849764.0 Ops/sec
$.inArray last 4168621.2 Ops/sec
indexOf middle 24776254.0 Ops/sec
$.inArray middle 5433931.5 Ops/sec
indexOf 8319148.5 Ops/sec
$.inArray 1846602.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • indexOf first

  • $.inArray first

  • indexOf last

  • $.inArray last

  • indexOf middle

  • $.inArray middle

  • indexOf

  • $.inArray


;