Test case name | Result |
---|---|
text.includes() | |
regex.test() | |
string.match() | |
string.indexOf() | |
string.toLowerCase().indexOf() |
Test name | Executions per second |
---|---|
text.includes() | 19354550.0 Ops/sec |
regex.test() | 11003950.0 Ops/sec |
string.match() | 6793995.0 Ops/sec |
string.indexOf() | 12786650.0 Ops/sec |
string.toLowerCase().indexOf() | 16315570.0 Ops/sec |