Each Test (v2)

Revision 2 of this benchmark created by Faraz on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Jquery Each
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

$.each(array, function(index, value) {

  console.log(value);
})
ready
Underscore Each
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

_.each(array, function(value) {
  console.log(value);
})
ready

Revisions

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