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
Test if the size of the image or sprite is power of two and show impact on the performance of css transform
<div style="position:relative; width: 1100px; height: 512px">
<div id="poweroftwo" style="position: absolute; left: 480px; width: 512px; height: 512px; background: blue;">
</div>
<div id="nopoweroftwo" style="position: absolute; left: -25px; width: 500px; height: 500px; background: red;">
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script type="text/javascript">
var degreePowerOfTwo = 0,
degreeNoPowerOfTwo = 0,
loadPowerOfTwo = 0,
loadNoPowerOfTwo = 0;
var loadImage = function(isPowerOfTwo) {
if (isPowerOfTwo) $('#poweroftwo').css('background', 'url("http://goo.gl/qEmjt") top left no-repeat');
else $('#nopoweroftwo').css('background', 'url("http://goo.gl/VrMYl") top left no-repeat');
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Rotation: Power of two |
| ready |
Rotation: Not power of two |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.