Kimbo vs jQuery each method

JavaScript performance comparison

Test case created by Denis

Preparation code

<script src="http://kimbojs.com/lib/kimbo.js">
</script>
<script src="http://kimbojs.com/lib/jquery.js">
</script>
<div id="header">
  <h1>
    Test
  </h1>
  <nav>
    <ul class="menu">
      <li class="button">
        One
      </li>
      <li class="button">
        Two
      </li>
      <li class="button">
        Three
      </li>
    </ul>
  </nav>
</div>
<div id="container">
  <h2>
    Test 2
  </h2>
  <p>
    Lorem
  </p>
  <ul id="list" class="menu">
    <li>
      Item 1
    </li>
    <li>
      Item 2
    </li>
    <li>
      Item 3
    </li>
  </ul>
  <form>
    <input name="name" placeholder="name" />
  </form>
</div>
<div id="footer">
  <p>
    Footer
  </p>
</div>
<script>
  window.$k = Kimbo;
  window.$j = jQuery;
</script>
    

Preparation code output

<script src="http://kimbojs.com/lib/jquery.js"> </script> <div id="header"> <h1> Test </h1> <nav> <ul class="menu"> <li class="button"> One </li> <li class="button"> Two </li> <li class="button"> Three </li> </ul> </nav> </div> <div id="container"> <h2> Test 2 </h2> <p> Lorem </p> <ul id="list" class="menu"> <li> Item 1 </li> <li> Item 2 </li> <li> Item 3 </li> </ul> <form> <input name="name" placeholder="name" /> </form> </div> <div id="footer"> <p> Footer </p> </div> <script> window.$k = Kimbo; window.$j = jQuery; </script>

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
Kimbo .each()
$k('li').each(function () {});
pending…
jQuery .each()
$j('li').each(function () {});
pending…

Compare results of other browsers

Revisions

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

2 Comments

Rick Waldron commented :

This isn't really measuring the iteration... you'd need to cache the selection and only do the iteration in the test. Also, it helps if the iteration callback is actually doing something with the element (even reading it is sufficient to measure)

Denis commented :

You are right, I will link the new tests you've done. Thanks!

Test 2

Lorem