Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
Safari 15
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Loop with N/2 iterations and 2x iteration size 39077.5 Ops/sec
Simple Loop 40851.2 Ops/sec
Reverse While 40919.0 Ops/sec
Reverse While !== 0 41218.1 Ops/sec
Script Preparation code:
Tests:
  • Loop with N/2 iterations and 2x iteration size

  • Simple Loop

  • Reverse While

  • Reverse While !== 0