Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Windows
Desktop
2 years ago
string.indexOf()
25.1M/s
text.includes()
25.0M/s
regex.test()
13.6M/s
string.match()
11.5M/s
View exact numbers
Test name Executions per second
string.indexOf() 25,080,014 Ops/sec
text.includes() 25,040,022 Ops/sec
regex.test() 13,567,554 Ops/sec
string.match() 11,472,472 Ops/sec
Script Preparation code:
Tests: