Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Linux
Desktop
one year ago
text.includes()
18.7M/s
string.indexOf()
14.2M/s
regex.test()
11.5M/s
string.match()
8.1M/s
View exact numbers
Test name Executions per second
text.includes() 18,685,764 Ops/sec
string.indexOf() 14,220,330 Ops/sec
regex.test() 11,548,170 Ops/sec
string.match() 8,117,944 Ops/sec
Script Preparation code:
Tests: