Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Chrome 122
Linux
Desktop
2 years ago
Benchmark.js
String.includes
24.8M/s
RegEx.test
10.9M/s
String.match
5.7M/s
View exact numbers
Test name Executions per second
String.includes 24,845,406 Ops/sec
RegEx.test 10,852,076 Ops/sec
String.match 5,746,688 Ops/sec
Script Preparation code:
Tests: