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
string.indexOf()
16.2M/s
text.includes()
16.1M/s
regex.test()
10.0M/s
string.match()
8.6M/s
View exact numbers
Test name Executions per second
string.indexOf() 16,183,310 Ops/sec
text.includes() 16,051,163 Ops/sec
regex.test() 10,045,774 Ops/sec
string.match() 8,555,794 Ops/sec
Script Preparation code:
Tests: