underscore clone vs jquery extend (v20)

Revision 20 of this benchmark created on


Preparation HTML

<script src="http://underscorejs.org/underscore-min.js"></script>
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>

Setup

var user = JSON.parse('{"id":"116","ranking":20100,"name":"robertstracke","full_name":"Robert Stracke","email":"robert.stracke@yammer-inc.com","job_title":null,"photo":"https://www.yammer.dev/mugshot/images/48x48/no_photo.png","mugshot_url_template":"https://www.yammer.dev/mugshot/images/{width}x{height}/no_photo.png","web_url":"https://www.yammer.dev/yammer-inc.com/users/robertstracke","presence":null,"group_ids":[],"index":"user_users","model":"user","insertTime":1360688112053}');

Test runner

Ready to run.

Testing in
TestOps/sec
underscore
_.clone(user);
ready
jquery
$.extend(false, {}, user);
ready
jquery deep
$.extend(true, {}, user);
ready
JSON
JSON.parse(JSON.stringify(user));
ready
Underscore extend
_.extend(user)
ready

Revisions

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