.clone() vs .html() vs outerHTML (v3)

Revision 3 of this benchmark created by dfgdsdfsfdsdfgq on


Preparation HTML

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

<span></span>

Test runner

Ready to run.

Testing in
TestOps/sec
.clone()
$("span").clone();
ready
.html()
$("span").html();
ready
outerHTML
$("span")[0].outerHTML;
ready

Revisions

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