Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Firefox 57
Windows 7
Other
7 years ago
Test name Executions per second
Use regex 2198835.0 Ops/sec
Use split 1736363.2 Ops/sec
Use indexOf 3212878.8 Ops/sec
Script Preparation code:
Tests:
  • Use regex

  • Use split

  • Use indexOf