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
window.parseRequestInfoOld = function(requestPath) {
const matches =
requestPath.match(
/[/]?(@[-_a-z-A-Z0-9.]+\/[-_a-z-A-Z0-9.]+|[a-zA-Z-0-9.]+)(@([-_a-zA-Z-0-9.]+))?(\/v([0-9.]+))?(\/(bundled|unbundled))?(\/[-_/a-zA-Z0-9.+]+)?/,
) || [];
const packageName = matches[1] || '';
const version = matches[3] || '';
const bundled = (matches.length > 8 && matches[7]) === 'bundled';
const filePath = (matches.length > 8 && matches[8]) || '';
return {
packageName,
version,
bundled,
filePath,
};
}
window.parseRequestInfoNew = function(requestPath) {
const matches =
requestPath.match(
// 1 package name 2 version refresh 3 bundled 4 file path end or query
/^\/?((?:@[-\w.]+\/)?[-\w.]+)(?:@([-\w.]+))?(?:\/v[\d.]+)?(?:\/(bundled|unbundled))?(\/[-\w.+/]+)?(?:\?|$)/,
) || [];
return {
packageName: matches[1] || '',
version: matches[2] || '',
bundled: matches[3] === 'bundled',
filePath: matches[4] || '',
};
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Test old |
| ready |
Test new |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.