Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
2 years ago
text.includes()
33.4M/s
string.indexOf()
32.9M/s
regex.test()
21.1M/s
string.match()
18.3M/s
View exact numbers
Test name Executions per second
text.includes() 33,369,206 Ops/sec
string.indexOf() 32,881,176 Ops/sec
regex.test() 21,100,954 Ops/sec
string.match() 18,288,242 Ops/sec
Script Preparation code:
Tests: