html vs svg vs canvas (v6)

Revision 6 of this benchmark created by dfsa on


Setup

var canvas = document.createElement('canvas');
    var svg = document.createElementNS("http://www.w3.org/2000/svg", 'svg');
    var context= canvas.getContext('2d');
        context.beginPath();

Teardown


        context.stroke();
        context.closePath(); 
  

Test runner

Ready to run.

Testing in
TestOps/sec
canvas
context.lineWidth = 1;
    context.moveTo(0, 0); 
    context.lineTo(100, 100);
    
 
ready
svg
var rect = document.createElementNS("http://www.w3.org/2000/svg", 'path');
rect.setAttribute("d", "M5 60 l215 0");
rect.setAttribute("stroke", "black");
svg.appendChild(rect);

 
ready

Revisions

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