alpha-vs-nay

JavaScript performance comparison

Test case created by Simon

Preparation code

<canvas id="canvas1" width="400" height="400" style="border:1px solid black;"></canvas>
<script>
    var can = document.getElementById('canvas1');
    var ctx = can.getContext('2d');

</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
no alpha
ctx.clearRect(0,0,500,500);
ctx.fillRect(50,50,50,50);
 
pending…
alpha
ctx.clearRect(0,0,500,500);
ctx.globalAlpha = 0.5;
ctx.fillRect(50,50,50,50);
ctx.globalAlpha = 1;
pending…
path no alpha
ctx.clearRect(0,0,500,500);
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(52,42);
ctx.quadraticCurveTo(321,321,12,90);
ctx.quadraticCurveTo(121,21,112,190);
ctx.stroke();
ctx.fill();
pending…
path alpha
ctx.clearRect(0,0,500,500);
ctx.globalAlpha = 0.5;
ctx.beginPath();
ctx.moveTo(0,0);
ctx.lineTo(52,42);
ctx.quadraticCurveTo(321,321,12,90);
ctx.quadraticCurveTo(121,21,112,190);
ctx.stroke();
ctx.fill();
ctx.globalAlpha = 1;
pending…

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

Compare results of other browsers

0 comments

Add a comment