Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
rgb vs rgba (1 & 0.5) vs hex canvas
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Iron Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
9 months ago
Test name
Executions per second
alpha 1
1790317.2 Ops/sec
no alpha
1786672.1 Ops/sec
hex
1821118.8 Ops/sec
apha 0.5
1764681.5 Ops/sec
HTML Preparation code:
<canvas id="canvasOne" width="400" height="400"></canvas> <canvas id="canvasTwo" width="400" height="400"></canvas> <canvas id="canvasThr" width="400" height="400"></canvas> <canvas id="canvasFour" width="400" height="400"></canvas>
Script Preparation code:
var canvasOne = document.getElementById("canvasOne"); var ctxOne = canvasOne.getContext("2d"); var canvasTwo = document.getElementById("canvasTwo"); var ctxTwo = canvasTwo.getContext("2d"); var canvasThr = document.getElementById("canvasThr"); var ctxThr = canvasThr.getContext("2d"); var canvasFour = document.getElementById("canvasThr"); var ctxFour = canvasFour.getContext("2d");
Tests:
alpha 1
ctxOne.clearRect(0, 0, 400, 400); ctxOne.beginPath(); ctxOne.fillStyle = 'rgba(231, 76, 60, 1)'; ctxOne.arc(200, 200, 100, 0, Math.PI * 2, true); ctxOne.fill();
no alpha
ctxTwo.clearRect(0, 0, 400, 400); ctxTwo.beginPath(); ctxTwo.fillStyle = 'rgb(249, 206, 201)'; ctxTwo.arc(200, 200, 100, 0, Math.PI * 2, true); ctxTwo.fill();
hex
ctxThr.clearRect(0, 0, 400, 400); ctxThr.beginPath(); ctxThr.fillStyle = '#f9cec9'; ctxThr.arc(200, 200, 100, 0, Math.PI * 2, true); ctxThr.fill();
apha 0.5
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();