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
Is it quicker to retrieve a javascript file from localStorage than it is to let the browser fetch a cached copy from its own cache?
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
// A random URL from a CORS enabled data source
var url = "http://aignatov.ru-br.4game.com.dev/test.js";
localStorage.setItem('file', 'if (resolveHandler2) { resolveHandler2(); }');
</script>
var script = document.getElementById('lc');
if (script && script.parentNode) {
script.parentNode.removeChild(script);
}
script = document.getElementById('bc');
if (script && script.parentNode) {
script.parentNode.removeChild(script);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
localStorage |
| ready |
Browser cache |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.