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
<style>
#a {
width: 20px;
height: 20px;
position: absolute;
border: 1px solid;
top: 0;
left: 0;
}
</style>
<div id="a">a</div><script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
function animate(object, property, start_value, end_value, time) {
var frame_rate = 0.06; // 60 FPS
var frame = 0;
var delta = (end_value - start_value) / time / frame_rate;
var handle = setInterval(function() {
frame++;
var value = start_value + delta * frame;
object.style[property] = value + "px";
if (value == end_value) {
clearInterval(handle);
}
}, 1 / frame_rate);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Animate JS |
| ready |
Animate jQuery |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.