Run details:
Mozilla/5.0 (Linux; Android 11; SAMSUNG SM-A705FN) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/16.0 Chrome/92.0.4515.166 Mobile Safari/537.36
Chrome Mobile 92
Android
Mobile
2 years ago
Test name Executions per second
if loop 3921.1 Ops/sec
while + switch/case loop 3687.9 Ops/sec
function + switch/case loop 3689.9 Ops/sec
Script Preparation code:
Tests:
  • if loop

  • while + switch/case loop

  • function + switch/case loop