Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Mobile Safari/537.36
Chrome Mobile 121
Android
Mobile
9 months ago
Test name Executions per second
For Loop for item towards beginning 5475487.0 Ops/sec
While Loop for item towards beginning 6063246.5 Ops/sec
indexOf for item towards beginning 6348407.5 Ops/sec
For Loop for item towards end 4954808.5 Ops/sec
While Loop for item towards end 4936928.5 Ops/sec
indexOf for item towards end 6316228.0 Ops/sec
Script Preparation code:
Tests:
  • For Loop for item towards beginning

  • While Loop for item towards beginning

  • indexOf for item towards beginning

  • For Loop for item towards end

  • While Loop for item towards end

  • indexOf for item towards end


;