SVG appendChild (v5)

Revision 5 of this benchmark created on


Preparation HTML

<script>
  var ns = "http://www.w3.org/2000/svg";
  var svg = document.createElementNS(ns, 'svg');
  var _svg = document.createElementNS(ns, 'svg');
  document.body.appendChild(svg);
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
append each child
  var svg1 = _svg.cloneNode();
  var path1 = document.createElementNS(ns, 'path');
  svg1.appendChild(path1);
  document.body.appendChild(svg1);
ready
append group
  var path2 = document.createElementNS(ns, 'path');
  var g2 = document.createElementNS(ns, 'g');
  g2.appendChild(path2);
  svg.appendChild(g2);
 
ready

Revisions

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