var string = "Hello world!";
var regex = /Hello/;
string.startsWith("Hello");
string.match("Hello");
--enable-precise-memory-info
flag.
Test case name | Result |
---|---|
RegEx.test | |
String.match |
Test name | Executions per second |
---|---|
RegEx.test | 28370144.0 Ops/sec |
String.match | 3017051.5 Ops/sec |