Test name | Executions per second |
---|---|
String.startsWith | 1972865920.0 Ops/sec |
String.match | 39209064.0 Ops/sec |
startsWith | 1977266048.0 Ops/sec |
var string = "Hello world!";
var regex = /Hello/;
string.startsWith("Hello");
string.match(regex);
string.startsWith("Hello");