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
Which is faster - attr(href) of this.hash for selecting internal links.
<a href="http://www.link1.com/">Ext Link 1</a>
<a href="http://www.link2.co.uk">Ext Link 2</a>
<a href="#link1">Anchor 1</a>
<a href="#link2">Anchor 2</a>
<a href="#link3">Anchor 3</a>
<a href="#link4">Anchor 4</a>
<a href="#link5">Anchor 5</a>
<a href="#link6">Anchor 6</a>
<a href="#link7">Anchor 7</a>
<a href="#link8">Anchor 8</a>
<a href="#link9">Anchor 9</a>
<a href="#link10">Anchor 10</a>
<a href="http://www.link3.com/#top">Ext Link 3</a>
<a href="http://www.link4.org">Ext Link 4</a>
<div id="#link1">1</div><div id="#link2">2</div><div id="#link3">3</div><div id="#link4">4</div><div id="#link5">5</div><div id="#link6">6</div><div id="#link7">7</div><div id="#link8">8</div><div id="#link9">9</div><div id="#link10">10</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
Ready to run.
Test | Ops/sec | |
---|---|---|
.attr('href') |
| ready |
.hash |
| ready |
.attr('href') - 2 var |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.