underscore vs jquery extend (v2)

Revision 2 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
   }
  };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jquery extend
$.extend({}, options, {
 age: 27
});
ready
underscore extend
_.extend({}, options, {
 age: 27
});
ready
jquery deep extend
$.extend(true, {}, options, {
 age: 27
});
ready

Revisions

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