Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
RegEx.test vs. String.includes vs. String.match late match
(version: 1)
Comparing performance of:
RegEx.test vs String.includes vs String.match
Created:
one year ago
by:
Guest
Go to the latest result
Script Preparation code:
var string = "Hello world!"; var regex = /world/;
Tests:
RegEx.test
regex.test(string);
String.includes
string.includes("world");
String.match
string.match("world");
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
RegEx.test
String.includes
String.match
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15
Browser/OS:
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
RegEx.test
407.6M/s
String.includes
46.1M/s
String.match
20.6M/s
View exact numbers
Test name
Executions per second
✓
RegEx.test
407,645,632 Ops/sec
String.includes
46,120,600 Ops/sec
String.match
20,578,666 Ops/sec
Related benchmarks
RegEx.test vs. String.includes vs. String.match
RegEx.test vs. String.includes vs. String.match1
Long regex test vs string includes
Longer regex test vs string includes
RegEx.test vs. String.includes x 2
Comments
Confirm delete:
Do you really want to delete benchmark?