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
http://bugs.jquery.com/ticket/9336
<div id="a"></div>
<div id="b"></div>
<div id="c"></div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
jQuery.expr.filters.realhidden = function(elem) {
var width = elem.offsetWidth,
height = elem.offsetHeight;
return (width === 0 && height === 0) || (!jQuery.support.reliableHiddenOffsets && (elem.style.display || jQuery.css(elem, "display")) === "none" && (elem.style.opacity || jQuery.css(elem, "opacity")) === "0");
};
jQuery('#a').css({
opacity: 0
});
jQuery('#b').css({
opacity: 100
});
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Existing (no opacity check) |
| ready |
Added opacity check |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.