Test case name | Result |
---|---|
text.includes() | |
regex.test() | |
string.match() | |
string.indexOf() |
Test name | Executions per second |
---|---|
text.includes() | 18685764.0 Ops/sec |
regex.test() | 11548170.0 Ops/sec |
string.match() | 8117944.0 Ops/sec |
string.indexOf() | 14220330.0 Ops/sec |