Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128
Linux
Desktop
2 years ago
Benchmark.js
String.includes
6.3M/s
RegEx.test
2.9M/s
String.match
1.7M/s
View exact numbers
Test name Executions per second
String.includes 6,344,374 Ops/sec
RegEx.test 2,884,603 Ops/sec
String.match 1,695,610 Ops/sec
Script Preparation code:
Tests: