Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Linux
Desktop
2 years ago
string.indexOf()
16.2M/s
text.includes()
16.1M/s
regex.test()
9.8M/s
string.match()
8.4M/s
View exact numbers
Test name Executions per second
string.indexOf() 16,228,246 Ops/sec
text.includes() 16,050,590 Ops/sec
regex.test() 9,779,787 Ops/sec
string.match() 8,390,056 Ops/sec
Script Preparation code:
Tests: