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
Does using basket.js improve caching performance over the browser cache?
<script src="https://addyosmani.github.com/basket.js/dist/basket.js">
</script>
// Warm the cache
// A random URL from a CORS enabled data source
var url = "http://www.wibbly.org.uk/jquery.js";
// This can be synchronous for testing purposes
var xhr = new XMLHttpRequest();
xhr.open("GET", url, false);
xhr.send();
if (xhr.status === 200) {
var now = +new Date();
// Adding to the localStorage by hand to make sure that it is done
// synchronously
localStorage.setItem("basket-jquery", xhr.responseText);
}
basket.remove("jquery");
var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
var script = scripts[i];
if (script.defer || script.src === url) {
script.parentElement.removeChild(script);
}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
basket.js |
| ready |
Browser cache |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.