Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.109 Safari/537.36
Chrome 98
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Loop with N/2 iterations and 2x iteration size 42619.3 Ops/sec
Simple Loop 41414.6 Ops/sec
Reverse While 41482.2 Ops/sec
Reverse While !== 0 42016.8 Ops/sec
Script Preparation code:
Tests:
  • Loop with N/2 iterations and 2x iteration size

  • Simple Loop

  • Reverse While

  • Reverse While !== 0