Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0
Chrome 131
Linux
Desktop
one year ago
text.includes()
154.7M/s
string.indexOf()
149.5M/s
regex.test()
37.8M/s
string.match()
25.5M/s
View exact numbers
Test name Executions per second
text.includes() 154,672,000 Ops/sec
string.indexOf() 149,548,736 Ops/sec
regex.test() 37,764,080 Ops/sec
string.match() 25,502,044 Ops/sec
Script Preparation code:
Tests: