undescore each vs jquery each

Benchmark created by mrangel on


Description

Checking underscore each versus jquery (1.3.2) each

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="//documentcloud.github.com/underscore/underscore.js"></script>
 
<script>
  var a = $('*').get(),
      e;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jquery each
$.each(a, function() {
 e = this;
});
ready
_ each
_.each(a, function(el) {
 e = this;
});
ready
jquery each alt
$(a).each(function() {
 e = this;
});
ready

Revisions

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