Test jquery each vs _each

Benchmark created by Christian on


Description

Checks which one is faster

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//underscorejs.org/underscore.js"></script>

Setup

var a = [];
    for(var i=0;i<5000;i++){
    a.push("test")
    
    }

Test runner

Ready to run.

Testing in
TestOps/sec
underscore
_.each(a,function(){})
ready
jquery
jQuery.each(a,function(){})
ready

Revisions

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

  • Revision 1: published by Christian on