Underscore.each vs jQuery.each vs. for loop (v97)

Revision 97 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<script src="//documentcloud.github.com/underscore/underscore-min.js">
</script>
<script>
  var pi = Math.PI
  var a = new Array(100000),
      e;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
underscore.each
_.each(a, function(item) {
  e = pi;
});
ready
underscore.each (OO)
_(a).each(function(item) {
  e = pi;
});
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.