underscore vs jquery extend (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script>
  var options = {
   name: "Dave",
   age: 26,
   family: {
    father: true,
    mother: true
   }
  };
  var bob = function () {
    console.log('addition');
  }
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jquery extend
$.extend(options, {
 bob: function () { console.log('27'); }
});
ready
underscore extend
_.extend(options, {
 bob: function () { console.log('27'); }
});
ready
simple
options.bob = function () { console.log('27'); }
ready

Revisions

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