cloneNode vs. jquery-clone (v6)

Revision 6 of this benchmark created on


Preparation HTML

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

<div id="source-node">
  <div>Some content</div>
  <div>More content</div>
</div>

Setup

$source = $("#source-node");
    source = $source[0];

Test runner

Ready to run.

Testing in
TestOps/sec
cloneNode
source.cloneNode(true);
ready
jQuery clone
$source.clone(true);
ready
jQuery create
$('<div/>',{'id':'source-node'}).append([
  $('<div/>',{'html':'Some content'}),
  $('<div/>',{'html':'More content'})
]);
ready

Revisions

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