Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.11
Desktop
one year ago
Test name Executions per second
Use regex 636669.9 Ops/sec
Use split 961613.4 Ops/sec
Use indexOf 1430370.1 Ops/sec
Script Preparation code:
Tests:
  • Use regex

  • Use split

  • Use indexOf