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
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
$window = jQuery(window)
$win = jQuery(window)
$win.width = function() {
return window.innerWidth;
}
$win.height = function() {
return window.innerHeight;
}
A = {
B: {
height: $win.height(),
width: $win.width()
}
}
$win.cachedHeight = function() {
return A.B.height;
}
$win.cachedWidth = function() {
return A.B.width;
}
(function() {
var width = A.B.width;
var height = A.B.height;
$win.cWidth = function() {
return width;
}
$win.cHeight = function() {
return height;
}
})();
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery |
| ready |
direct |
| ready |
cached window |
| ready |
overwritten methods |
| ready |
cached values |
| ready |
closure |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.