title: Deep cloning vs setting of innerHTML: what's faster?
body: <p>I'm trying to figure out the most performant way of deep-cloning a DOM tree within the browser.</p>
  
  <p>If I start out with</p>
  
  <pre><code>var div = document.getElementById("source");
  var markup = div.innerHTML;
  </code></pre>
  
  <p>What will be faster,</p>
  
  <pre><code>var target = div.cloneNode(true);
  </code></pre>
  
  <p>or</p>
  
  <pre><code>var target = document.cloneNode(false);
  target.innerHTML = markup;
  </code></pre>
  
  <p>I understand the browser platform may make a big difference here, so any information about how these compare in the real world would be appreciated.</p>