Underscore extend vs jQuery extend

Benchmark created by Shadow Fox on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://underscorejs.org/underscore-min.js"></script>

Setup

var obj = {
    
    cats: 'furry animal that scratches your face',
    numberCats: 65,
    age: 1000,
    sound: 'meow?',
    cage: [
    {name:'Fred', furColor: 'purple'},
    {name:'Bob', furColor: 'green'},
    {name:'Furry', furColor: 'red'}
    ]
    
    };

Teardown


    obj = null;
  

Test runner

Ready to run.

Testing in
TestOps/sec
Underscore Extend
_.extend({},obj);
ready
jQuery Extend
$.extend({},obj);
ready

Revisions

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