jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Compare regex to substring on analysis of CSS dimension
var testRegex = /([0-9]*[.]?[0-9]*)(%|px|mm|cm|in|pc|pt|px|ex|em|rem|0|none|auto)/i,
testProperties = ['100%', '1.5rem', 'auto', '26px'],
propIdx = 0,
numProps = testProperties.length,
nextProp = null,
propInfo = null;
propIdx = 0;
nextProp = null;
propInfo = null;
Ready to run.
Test | Ops/sec | |
---|---|---|
regex |
| ready |
substring |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.