cloneNode vs. jquery-clone

Benchmark created by Jarno Keskikangas 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")[0];

Test runner

Ready to run.

Testing in
TestOps/sec
cloneNode
source.cloneNode(true);
ready
jQuery clone
$(source).clone();
ready

Revisions

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