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="gallery-thumbs">
<ul class="thumb">
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
</ul>
<ul class="thumb">
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
</ul>
<ul class="thumb">
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
<li><a href="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png"><img src="http://static.hubspot.com/img/follow/icon_rss.png" /></a></li>
</ul>
</div>
<div id="main-view">
<img src="http://www.webination.co.uk/blog/wp-content/uploads/2011/04/google-icon.png" />
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
(function($) {
$.fn.fullSizeFullOpacity = function() {
return this.each(function() {
var $a = $(this).find('a'),
$img = $a.find('img');
if ($a.attr('href') == $img.attr('src')) {
$img.css('opacity', 1.0);
}
});
};
$.fn.fullSizeFullOpacity2 = function() {
return this.each(function() {
$(this).find('a').each(function() {
var $img = $(this).find('img');
if (this.href == $img.attr('src')) {
$img.css('opacity', 1.0);
}
});
});
};
$.fn.fullSizeFullOpacity3 = function() {
return this.each(function() {
$(this).find('img').each(function() {
if (this.src == $img.closest('a')[0].href) {
$(this).css('opacity', 1.0);
}
});
});
};
}(jQuery));
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
fullSizeFullOpacity |
| ready |
fullSizeFullOpacity2 |
| ready |
fullSizeFullOpacity3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.