render-vs-prerender

JavaScript performance comparison

Revision 69 of this test case created by

Preparation code

<canvas id="myCanvas" width="800" height="600"</canvas>
		<script>
			var c = document.getElementById("myCanvas");
			var ctx = c.getContext("2d");

			
			ctx.beginPath();
			ctx.moveTo(0, 110);
			for (var i = 0; i < 500; i++) {
			  var p1 = i*5;
			  var p2 = Math.sin(i/10)*100 + 110;
			  ctx.lineTo(p1, p2);
			}
			ctx.lineCap = "round";
			ctx.lineJoin = "round";
			ctx.lineWidth = 4;
			ctx.strokeSytle = "rgb(0, 200, 0)";
			ctx.stroke();
		</script> 
    

Preparation code output

<canvas id="myCanvas" width="800" height="600"</canvas>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
render
			ctx.beginPath();
			ctx.moveTo(0, 110);
			for (var i = 0; i < 500; i++) {
			  var p1 = i*5;
			  var p2 = Math.sin(i/10)*100 + 110;
			  ctx.lineTo(p1, p2);
			}
			ctx.lineCap = "round";
			ctx.lineJoin = "round";
			ctx.lineWidth = 4;
			ctx.strokeSytle = "rgb(0, 200, 0)";
			ctx.stroke();
pending…

Compare results of other browsers

Revisions

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

0 Comments