Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
2 years ago
Benchmark.js
String.includes
16.7M/s
RegEx.test
6.0M/s
String.match
2.8M/s
View exact numbers
Test name Executions per second
String.includes 16,663,819 Ops/sec
RegEx.test 6,032,236 Ops/sec
String.match 2,762,760 Ops/sec
Script Preparation code:
Tests: