Run details:
Mozilla/5.0 (Android 10; Mobile; rv:84.0) Gecko/84.0 Firefox/84.0
Firefox Mobile 84
Android
Mobile
one year ago
Test name Executions per second
For Loop for item towards beginning 19693612.0 Ops/sec
While Loop for item towards beginning 19017012.0 Ops/sec
indexOf for item towards beginning 8537789.0 Ops/sec
For Loop for item towards end 3564975.2 Ops/sec
While Loop for item towards end 3567524.0 Ops/sec
indexOf for item towards end 2241513.5 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