Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0
Firefox 54
Windows 7
Other
7 years ago
Test name Executions per second
Use regex 819836.9 Ops/sec
Use split 985884.4 Ops/sec
Use indexOf 1679960.5 Ops/sec
Script Preparation code:
Tests:
  • Use regex

  • Use split

  • Use indexOf