underscore clone vs jquery extend (v3)

Revision 3 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": ["84796", "1332", "615530", "2458", "2556", "1064", "2480", "135305", "2275", "4768", "938", "1108", "149637", "484", "1201", "2189", "34536", "1975", "2510", "2193", "703157", "2010", "5951", "2274", "3215", "385", "912", "3295", "5403", "6271", "376", "570", "1002", "1675", "348", "705", "1059", "131344", "704750", "3438", "2703", "3855", "2669", "3344", "2705", "3807", "2561", "559", "546275", "2619", "4807", "1413", "3202", "4470", "2698", "2895"],"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

Revisions

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