Test case name | Result |
---|---|
regexp .test() | |
string .match() | |
indexOf === 0 | |
string .startsWith() |
Test name | Executions per second |
---|---|
regexp .test() | 11267350.0 Ops/sec |
string .match() | 9100691.0 Ops/sec |
indexOf === 0 | 17092090.0 Ops/sec |
string .startsWith() | 13038800.0 Ops/sec |