Run details:
Mozilla/5.0 (Linux; Android 13; SM-S908B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36
Chrome Mobile 107
Android
Mobile
2 years ago
Test name Executions per second
Use regex 2208241.8 Ops/sec
Use split 2312897.0 Ops/sec
Use indexOf 2715597.5 Ops/sec
Script Preparation code:
Tests:
  • Use regex

  • Use split

  • Use indexOf