Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Wildcard Match Test
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0
Browser:
Firefox 140
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Alphabet Test (many wildcards)
2.1M/s
Test False
652K/s
Test True
636K/s
View exact numbers
Test name
Executions per second
✓
Alphabet Test (many wildcards)
2,096,086 Ops/sec
Test False
651,591 Ops/sec
Test True
636,498 Ops/sec
Script Preparation code:
function matchRuleShort(str, rule) { var escapeRegex = (str) => str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); return new RegExp("^" + rule.split("*").map(escapeRegex).join(".*") + "$").test(str); }
Tests:
Test True
matchRuleShort("google.com/*/search", "google.com/epic/gamer/time/search")
Test False
matchRuleShort("google.com/*/search", "google.com/epic/gamer/time/sorch")
Alphabet Test (many wildcards)
matchRuleShort("a*c*e*g*i*k*m*o*q*s*u*w*y", "abcdefghijklmnopqurstuvwxyz")