SVG appendChild (v6)

Revision 6 of this benchmark created on


Preparation HTML

<script>
  var ns = "http://www.w3.org/2000/svg";
  var svg = document.createElementNS(ns, 'svg');
  var frag1 = document.createDocumentFragment();
  var frag2 = document.createDocumentFragment();
  frag2.appendChild(svg);
  var _svg = document.createElementNS(ns, 'svg');
  var _path = document.createElementNS(ns, 'path');
  _svg.appendChild(_path);
  var _g = document.createElementNS(ns, 'g');
  _g.appendChild(document.createElementNS(ns, 'path'));

</script>

Teardown


    document.body.appendChild(frag1);
  

Test runner

Ready to run.

Testing in
TestOps/sec
append each child
  var svg1 = svg .cloneNode(true);
  frag1.appendChild(svg1);
ready
append group
  var g2 = _g.cloneNode(true);
  svg.appendChild(g2);
 
ready

Revisions

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