test (v4)

Revision 4 of this benchmark created on


Preparation HTML

<canvas id="canv" style="background: black;filter: brightness(175%);width: 100%;height: 100%;position: absolute;"></canvas>

Setup


Test runner

Ready to run.

Testing in
TestOps/sec
Full width
var d = document;
var c;
var ctx;
c = d.getElementById('canv');
ctx = c.getContext('2d');
c.width = d.documentElement.clientWidth;
len = 180;
for (i = 0; i < len; i++) {
	ctx.fillStyle = '#4488CC';
    ctx.fillRect(i * c.width / len, 0, c.width, c.height);
}
ready
double width
var d = document;
var c;
var ctx;
c = d.getElementById('canv');
ctx = c.getContext('2d');
c.width = d.documentElement.clientWidth;
len = 180;
for (i = 0; i < len; i++) {
	ctx.fillStyle = '#4488CC';
    ctx.fillRect(i * c.width / len, 0, 2*c.width / len, c.height);
}
ready

Revisions

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