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
I guess this test doesn't work as intended because the 4th test isn't waiting for the animation to end, which makes it look quicker than it probably is.
<style>
body {
}
#moving-1 {
width: 150px;
height: 80px;
background-color: #e8f2f4;
border: 2px solid #999;
top: 0px;
left: 0px;
position: absolute;
}
.moving-1-animated {
top: 0px !important;
width: 1200px !important;
height: 300px !important;
left: 200px !important;
opacity: 0.1 !important;
transition: all 0.8s linear;
-webkit-transition: all 0.8s linear;
}
#moving-2 {
width: 130px;
height: 80px;
background-color: #eee4c9;
border: 2px solid #999;
top: 100px;
left: 0px;
position: absolute;
}
.moving-2-animated {
top: 220px !important;
width: 1000px !important;
height: 100px!important;
left: 300px !important;
opacity: 0.3 !important;
transition: all 0.6s linear;
-webkit-transition: all 0.6s linear;
animation-delay:0.6s;
webkit-animation-delay:0.6s;
}
#moving-3 {
width: 170px;
height: 80px;
background-color: #edc9ee;
border: 2px solid #999;
top: 200px;
left: 0px;
position: absolute;
}
.moving-3-animated {
top: 0px !important;
width: 800px !important;
height: 400px !important;
left: 500px !important;
opacity: 0.9 !important;
transition: all 0.9s linear;
-webkit-transition: all 0.9s linear;
animation-delay:1s;
webkit-animation-delay:1s;
}
#moving-4 {
width: 150px;
height: 80px;
background-color: #d3eec9;
border: 2px solid #999;
top: 300px;
left: 0px;
position: absolute;
}
.moving-4-animated {
top: 490px !important;
width: 1700px !important;
height: 800px !important;
left: 100px !important;
opacity: 0.2 !important;
transition: all 1.0s linear;
-webkit-transition: all 1.0s linear;
animation-delay:0.2s;
webkit-animation-delay:0.2s;
}
#moving-5 {
width: 100px;
height: 80px;
background-color: #eec9d2;
border: 2px solid #999;
top: 400px;
left: 0px;
position: absolute;
}
.moving-5-animated {
top: 0px !important;
width: 1400px !important;
height: 900px !important;
left: 100px !important;
opacity: 0.3 !important;
transition: all 1.6s linear;
-webkit-transition: all 1.6s linear;
animation-delay:1.3s;
webkit-animation-delay:1.3s;
}
#moving-6 {
width: 140px;
height: 80px;
background-color: #daeec9;
border: 2px solid #999;
top: 500px;
left: 0px;
position: absolute;
}
.moving-6-animated {
top: 300px !important;
width: 600px !important;
height: 600px !important;
left: 600px !important;
opacity: 0.4 !important;
transition: all 0.3s linear;
-webkit-transition: all 0.3s linear;
animation-delay:1.9s;
webkit-animation-delay:1.9s;
}
#moving-7 {
width: 150px;
height: 80px;
background-color: #c9eeee;
border: 2px solid #999;
top: 600px;
left: 0px;
position: absolute;
}
.moving-7-animated {
top: 0px !important;
width: 200px !important;
height: 800px !important;
left: 800px !important;
opacity: 0.4 !important;
transition: all 1.2s linear;
-webkit-transition: all 1.2s linear;
animation-delay:0.5s;
webkit-animation-delay:0.5s;
}
#moving-8 {
width: 170px;
height: 80px;
background-color: #dcc9ee;
border: 2px solid #999;
top: 700px;
left: 0px;
position: absolute;
}
.moving-8-animated {
top: 300px !important;
width: 600px !important;
height: 1200px !important;
left: 400px !important;
opacity: 0.9 !important;
transition: all 1.4s linear;
-webkit-transition: all 1.4s linear;
animation-delay:1s;
webkit-animation-delay:1s;
}
#moving-9 {
width: 120px;
height: 80px;
background-color: #e3eec9;
border: 2px solid #999;
top: 800px;
left: 0px;
position: absolute;
}
.moving-9-animated {
top: 300px !important;
width: 100px !important;
height: 300px !important;
left: 800px !important;
opacity: 0.6 !important;
transition: all 0.9s linear;
-webkit-transition: all 0.9s linear;
animation-delay:2.3s;
webkit-animation-delay:2.3s;
}
</style>
<div id="moving-1" class="moving"></div>
<div id="moving-2" class="moving"></div>
<div id="moving-3" class="moving"></div>
<div id="moving-4" class="moving"></div>
<div id="moving-5" class="moving"></div>
<div id="moving-6" class="moving"></div>
<div id="moving-7" class="moving"></div>
<div id="moving-8" class="moving"></div>
<div id="moving-9" class="moving"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ricostacruz.com/jquery.transit/jquery.transit.min.js"></script>
document.getElementById('moving-1').classList.remove('moving-1-animated');
document.getElementById('moving-2').classList.remove('moving-2-animated');
document.getElementById('moving-3').classList.remove('moving-3-animated');
document.getElementById('moving-4').classList.remove('moving-4-animated');
document.getElementById('moving-5').classList.remove('moving-5-animated');
document.getElementById('moving-6').classList.remove('moving-6-animated');
document.getElementById('moving-7').classList.remove('moving-7-animated');
document.getElementById('moving-8').classList.remove('moving-8-animated');
document.getElementById('moving-9').classList.remove('moving-9-animated');
$('#moving-1').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-2').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-3').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-4').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-5').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-6').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-7').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-8').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
$('#moving-9').css({
top: 0,
width: 0,
height: 0,
left: 0,
opacity: 0.0,
WebkitTransition: 'all ',
transition: 'all ',
'WebkitTransition-duration': '0ms',
'transition-duration': '0ms',
'WebkitTransition-delay': '0ms',
'transition-delay': '0ms'
});
Ready to run.
Test | Ops/sec | |
---|---|---|
animate |
| ready |
transit |
| ready |
css |
| ready |
Vanilla + CSS |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.