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
<div id='container'>
<div id='scroll'>
</div>
</div>
<style>
#container {
overflow: hidden;
width: 500px;
height: 500px;
position: relative;
}
#scroll {
width: 50000px;
height: 500px;
background-color: red
position: absolute;
}
</style>var elContainer = document.querySelector('#container');
var elScroll = document.querySelector('#scroll');
var val = 0;
var run = function(target,fn) {
var delta = target-val;
if (delta > 1) {
val += delta*0.05;
fn(val);
run(target,fn);
};
};Ready to run.
| Test | Ops/sec | |
|---|---|---|
| Using scrollLeft | | ready |
| Using CSS transform (webkit) | | ready |
| Using CSS left | | ready |
| Using CSS transform | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.