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
var x = {
a: {
b: {
c: {
d: {
e: {
f: {
g: {
h: {
i: {
j: {
k: {
l: {
m: [1,2,3,4,5]
}
}
}
}
}
}
}
}
}
}
}
}
};
function loadScript(url, callback)
{
// adding the script tag to the head as suggested before
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
// then bind the event to the callback function
// there are several events for cross browser compatibility
script.onreadystatechange = callback;
script.onload = callback;
// fire the loading
head.appendChild(script);
}
var lodash1 = null;
var lodash4 = null;
loadScript("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.min.js", ()=>{
lodash1 = _;
loadScript("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js", ()=>{
lodash4 = _;
})
})
Ready to run.
Test | Ops/sec | |
---|---|---|
JSON.parse + JSON.stringify |
| ready |
lodash v4 cloneDeep |
| ready |
lodash v1 cloneDeep |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.