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
Is jQuery's $.each or Underscore's _.each faster if underscore is going through 53x as many elements?
Would be a fair test, if _(Modernizr), and $(Modernizr) would have the same number of elements...
Check the printed "items in xxx loop:" message...
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//documentcloud.github.com/underscore/underscore-min.js">
</script>
<script src="//www.modernizr.com/downloads/modernizr-2.0.js">
</script>
<div id='len'>
</div>
<hr />
<div id="content">
</div>
Ready to run.
Test | Ops/sec | |
---|---|---|
Underscore.js Each |
| ready |
jQuery Each |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.