Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Linux
Desktop
2 years ago
Benchmark.js
String.includes
16.7M/s
RegEx.test
7.1M/s
String.match
4.2M/s
View exact numbers
Test name Executions per second
String.includes 16,723,287 Ops/sec
RegEx.test 7,101,818 Ops/sec
String.match 4,248,030 Ops/sec
Script Preparation code:
Tests: