Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36
Chrome 132
Linux
Desktop
one year ago
text.includes()
78.4M/s
string.indexOf()
66.1M/s
regex.test()
14.8M/s
string.match()
8.8M/s
View exact numbers
Test name Executions per second
text.includes() 78,439,320 Ops/sec
string.indexOf() 66,075,648 Ops/sec
regex.test() 14,816,727 Ops/sec
string.match() 8,823,978 Ops/sec
Script Preparation code:
Tests: