Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Regex evaluation
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
Browser:
Chrome 130
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Regex
3.5M/s
Full Regex
3.1M/s
Substring
1.7M/s
View exact numbers
Test name
Executions per second
✓
Regex
3,481,534 Ops/sec
Full Regex
3,140,717 Ops/sec
Substring
1,689,711 Ops/sec
Script Preparation code:
var matchDirective = /webapp-v-([a-z-]+)(?::([a-zA-Z_.-]+))?/, fullDirective = /webapp-v-([a-z-]+)(?::([a-zA-Z_-]+)(?:\.([a-zA-Z_-]+))?)?/, attrName = "webapp-v-bind:class.ifdefined";
Tests:
Regex
var directivematch = matchDirective.exec(attrName), directivename = directivematch[1], directivopts = directivematch[2], pos = directivopts.indexOf("."), attrname = directivopts.substring(0, pos), buildIn = directivopts.substring(pos+1);
Substring
var directivematch = matchDirective.exec(attrName), pos = attrName.indexOf(":"), directivename = attrName.substring(0, pos), directivopts = attrName.substring(pos+1), posbuild = directivopts.indexOf("."), attrname = directivopts.substring(0, posbuild), buildIn = directivopts.substring(posbuild+1);
Full Regex
var directivematch = fullDirective.exec(attrName), directivename = directivematch[1], attrname = directivematch[2], buildIn = directivematch[3];