Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test1___nerr
(version: 1)
Comparing performance of:
regex vs includes
Created:
9 months ago
by:
Guest
Jump to the latest result
Script Preparation code:
const string = "top.suijidaohxl.77ytrfh4d4"; const regex = /^top\.suijidaohxl\.7{2}(?:y{1,2}(?:(?:(?:s{1,2}(?:6q5a82|dwjbw)|swhdse{2}|t{1,2}rdrgz|ztkie8)|t{1,2}rfh4d4)|rgdfs3x)|z(?:4tg8pk5|ckc4txk|ewdw7ze|gy(?:bxsy4|2k{2}4j)|hicmyax|dz682th|mdrdjbf|s(?:2rnhkx|4a5fah|esgycf|cnyf{2}a)|ifx8dyn|yrd2r8n|nrmwmx{2}|ts{2}wpyr|wsjthr{2}))$/;
Tests:
regex
string.match(regex);
includes
string == "top.suijidaohxl.77ytrfh4d4";
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
regex
includes
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
9 months ago
)
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser/OS:
Firefox 140 on Ubuntu
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
regex
26273558.0 Ops/sec
includes
1696279040.0 Ops/sec
Related benchmarks:
indexOf vs reg 复杂
custom vs regex
Regex vs startsWith
Literal regexp's vs string and array methods
String.indexOf vs RegExp.test (2)
Test benchmark 123
Lowercase string comparison vs case insensitive regex test
test1___nerr1
test1___nerr2
Comments
Confirm delete:
Do you really want to delete benchmark?