Run details:
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118
Chrome OS 14541.0.0
Desktop
one year ago
Test name Executions per second
Use regex 2538132.8 Ops/sec
Use split 3701122.2 Ops/sec
Use indexOf 3546774.2 Ops/sec
Script Preparation code:
Tests:
  • Use regex

  • Use split

  • Use indexOf