Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:101.0) Gecko/20100101 Firefox/101.0
Firefox 101
Windows 7
Desktop
2 years ago
Test name Executions per second
if loop 9181.6 Ops/sec
while + switch/case loop 9104.1 Ops/sec
function + switch/case loop 8816.0 Ops/sec
Script Preparation code:
Tests:
  • if loop

  • while + switch/case loop

  • function + switch/case loop


;