Run details:
Mozilla/5.0 (Linux; Android 12; M2101K7BNY) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36
Chrome Mobile 107
Android
Mobile
one year ago
Test name Executions per second
Regex and Loop 146287.3 Ops/sec
For loop, ParseInt 256911.1 Ops/sec
For loop with switch case 247614.2 Ops/sec
For loop, toString 457468.1 Ops/sec
Pure Regex 1837244.6 Ops/sec
Script Preparation code:
Tests:
  • Regex and Loop

  • For loop, ParseInt

  • For loop with switch case

  • For loop, toString

  • Pure Regex


;