Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Translucent RGBa vs Opaque RGBa with global alpha
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Translucent RGBa
1483197.6 Ops/sec
Opaque RGBa with globalAlpha
1341462.4 Ops/sec
HTML Preparation code:
<canvas id="canvasOne" width="400" height="400"></canvas> <canvas id="canvasTwo" width="400" height="400"></canvas>
Script Preparation code:
var canvasOne = document.getElementById("canvasOne"); var ctxOne = canvasOne.getContext("2d", { alpha: false }); var canvasTwo = document.getElementById("canvasTwo"); var ctxTwo = canvasTwo.getContext("2d", { alpha: false });
Tests:
Translucent RGBa
ctxOne.clearRect(0, 0, 400, 400); ctxOne.beginPath(); ctxOne.fillStyle = 'rgba(231, 76, 60, 0.5)'; ctxOne.arc(200, 200, 100, 0, Math.PI * 2, true); ctxOne.fill();
Opaque RGBa with globalAlpha
ctxTwo.clearRect(0, 0, 400, 400); ctxTwo.beginPath(); ctxTwo.fillStyle = 'rgba(231, 76, 60, 1)'; ctxTwo.globalAlpha = 0.5; ctxTwo.arc(200, 200, 100, 0, Math.PI * 2, true); ctxTwo.fill();