Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Cache js regex
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 12; Mobile; rv:131.0) Gecko/131.0 Firefox/131.0
Browser:
Firefox Mobile 131
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Not Cached
29294792.0 Ops/sec
Cached
24562526.0 Ops/sec
Script Preparation code:
var regex = /^\d+$/; var regularTest = value => { const pass = /^\d+$/.test(value); return !pass; }; var cachedTest = value => { const pass = regex.test(value); return !pass; };
Tests:
Not Cached
regularTest(555);
Cached
cachedTest(555);