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
const json = `{
"uri": "composite-documents/a3d6a2ae-01c6-4cd5-8814-0983684be1dc",
"guid": "1f4e034d-d994-45d4-be5d-7a325cd8926a"
}
`;
const meta = JSON.parse(json);
const transformInfinityWithJson = (obj) =>
JSON.parse(JSON.stringify(obj), (_key, value) => {
if (value === 'Infinity') {
return Infinity;
}
return value;
});
const transformInfinityWithObj = (obj) => {
for (const key in obj) {
if (typeof obj[key] === 'object') {
transformInfinityWithObj(obj[key]);
} else if (obj[key] === 'Infinity') {
obj[key] = Infinity;
}
}
};
Ready to run.
Test | Ops/sec | |
---|---|---|
as json |
| ready |
as object |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.