Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Linux
Desktop
2 years ago
text.includes()
18.7M/s
string.indexOf()
18.7M/s
regex.test()
11.2M/s
string.match()
9.1M/s
View exact numbers
Test name Executions per second
text.includes() 18,735,984 Ops/sec
string.indexOf() 18,679,736 Ops/sec
regex.test() 11,220,244 Ops/sec
string.match() 9,132,067 Ops/sec
Script Preparation code:
Tests: