Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137
Linux
Desktop
one year ago
text.includes()
189.5M/s
string.indexOf()
166.2M/s
regex.test()
32.6M/s
string.match()
23.4M/s
View exact numbers
Test name Executions per second
text.includes() 189,489,632 Ops/sec
string.indexOf() 166,223,728 Ops/sec
regex.test() 32,591,672 Ops/sec
string.match() 23,370,998 Ops/sec
Script Preparation code:
Tests: