Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135
Linux
Desktop
one year ago
string.indexOf()
149.2M/s
text.includes()
146.9M/s
regex.test()
26.1M/s
string.match()
17.3M/s
View exact numbers
Test name Executions per second
string.indexOf() 149,214,816 Ops/sec
text.includes() 146,918,048 Ops/sec
regex.test() 26,141,508 Ops/sec
string.match() 17,273,334 Ops/sec
Script Preparation code:
Tests: