Test case name | Result |
---|---|
RegExp.test (SINGLE) | |
String.includes (SINGLE) | |
String.match with regex (SINGLE) | |
String.indexOf (MULTIPLE) | |
String.search (SINGLE) | |
RegExp.exec (MULTIPLE) | |
String.match (SINGLE) | |
String.matchAll with regex(MULTIPLE) | |
String.matchAll (MULTIPLE) | |
String.search with regex (SINGLE) |
Test name | Executions per second |
---|---|
RegExp.test (BOOLEAN) | 3331553.0 Ops/sec |
String.includes (BOOLEAN) | 8864874.0 Ops/sec |
String.match (MULTIPLE) | 3266056.5 Ops/sec |
String.indexOf (MULTIPLE) | 8377502.0 Ops/sec |
String.search (MULTIPLE) | 3698174.2 Ops/sec |
RegExp.exec (MULTIPLE) | 3062319.8 Ops/sec |