Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Linux
Desktop
2 years ago
text.includes()
6.3M/s
string.indexOf()
6.2M/s
regex.test()
3.7M/s
string.match()
3.0M/s
View exact numbers
Test name Executions per second
text.includes() 6,285,192 Ops/sec
string.indexOf() 6,245,208 Ops/sec
regex.test() 3,737,815 Ops/sec
string.match() 2,989,607 Ops/sec
Script Preparation code:
Tests: