html vs svg vs canvas (v2)

Revision 2 of this benchmark created on


Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
canvas
var paper = canvas.getContext('2d');
paper.fillRect(10, 10, 50, 50);
ready
svg
var rect = document.createElementNS("http://www.w3.org/2000/svg", 'rect');
rect.setAttribute("x", 10);
rect.setAttribute("y", 10);
rect.setAttribute("width", 50);
rect.setAttribute("height", 50);
svg.appendChild(rect);
ready

Revisions

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