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
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<style>
.hidden { display:none; }
</style>
<p id="p">Algo</p>
<p id="p2" class="algo">Algo con class</p>
var oP = document.getElementById('p');
var oP2 = document.getElementById('p2');
var $oP = $('#p');
var $oP2 = $('#p2');
Ready to run.
Test | Ops/sec | |
---|---|---|
Display:none |
| ready |
Class Hidden |
| ready |
Class Hidden + other class |
| ready |
$.hide() |
| ready |
$.addClass('hidden') |
| ready |
$.css('display','none') |
| ready |
$(foo).css('display','none') |
| ready |
$(foo).hide() |
| ready |
$(foo).addClass('hidden') |
| ready |
classlist |
| ready |
hidden attr |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.