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
All cases with pre-calculated vendor prefixes (now including IE)
<div id="scrollTranslator" style="width:96000000px; height:200px; overflow: hidden"><div id="elem" style="position: relative; background:#ccc; width:1000px; height:1000px;"></div></div>
<script>
var translator = document.getElementById("scrollTranslator");
var elem = document.getElementById("elem");
var style = elem.style;
var setTransform = (style.WebkitTransform) ? function(transform) {
style.WebkitTransform = transform;
} : (style.MozTransform) ? function(transform) {
style.MozTransform = transform;
} : (style.msTransform) ? function(transform) {
style.msTransform = transform;
} : function(transform) {
style.OTransform = transform;
};
</script>
setTransform('none');
style.left = '0px';
style.top = '0px';
translator.scrollLeft = 0;
translator.scrollTop = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
translate3d |
| ready |
translateX/Y |
| ready |
css left/top |
| ready |
translate2d |
| ready |
scrollTop/scrollLeft |
| ready |
translate |
| ready |
matrix3d |
| ready |
matrix |
| ready |
translate2d + translateZ |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.