Kimbo vs jQuery vs BSI object iterator

JavaScript performance comparison

Revision 5 of this test case created by

Preparation code

<script src="https://kimbojs.com/dist/kimbo.min.js"></script>
<script src="https://code.jquery.com/jquery-git2.js"></script>
<script src="https://bytes1.dyndns.org/BSI/website-app.js"></script>
<script>
  window.$k = Kimbo;
  window.$j = jQuery;
  window.$b = BSI.O;
</script>
      
<script>
Benchmark.prototype.setup = function() {
  var obj = {
    a: '1',
    b: '2',
    c: '3',
    d: '4'
  },
  // BSI.O creates an instance of O.
  // lets cache the instance to benchmark the actual iteration.
  $b_obj = $b( obj );

};
</script>

Preparation code output

<script src="https://code.jquery.com/jquery-git2.js"></script> <script src="https://bytes1.dyndns.org/BSI/website-app.js"></script> <script> window.$k = Kimbo; window.$j = jQuery; window.$b = BSI.O; </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.forEach(obj)
$k.forEach(obj, function (key, value) {});
pending…
jQuery.each(obj)
$j.each(obj, function (key, value) {});
pending…
BSI.O.forEach()
$b(obj).forEach( function(value, key){} );
pending…
new BSI.O.forEach()
(new $b(obj)).forEach( function(value, key){} );
pending…
BSI.O.forEach() cached
$b_obj.forEach( function(value, key){} );
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.

0 Comments