jQuery Clone vs Extend (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Setup

var obj = $(".standard-thumb");

Test runner

Ready to run.

Testing in
TestOps/sec
Extend
var clone = $.extend(true, {}, obj);
ready
Clone
var clone = obj.clone();
ready
JSON
JSON.parse(JSON.stringify(obj));
ready

Revisions

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