jQuery each2 plugin vs jQuery core .each method

JavaScript performance comparison

Revision 47 of this test case created by a

Preparation code

<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>

<!-- the plugin -->
<script src="http://github.com/cowboy/jquery-misc/raw/master/jquery.ba-each2.js"></script>

  // Create a whole bunch of elements for iteration.
  var elems = $('<div/>').append(Array(1000).join('<span/>')).children();

Preparation code output

<!-- the plugin -->

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
jQuery core .each method
elems.each(function(i, elem) {
 this; // DOM element
 $(this); // jQuery object
jQuery each2 plugin
elems.each2(function(i, jq) {
 this; // DOM element
 jq; // jQuery object

Compare results of other browsers


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