Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Canvas roundrect vs fillrect perf
Finding the performance difference between the new "roundrect" method and fillrect
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:143.0) Gecko/20100101 Firefox/143.0
Browser:
Firefox 143
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
8 months ago
Test name
Executions per second
roundRect
3034389.2 Ops/sec
fillRect
863751.1 Ops/sec
HTML Preparation code:
<canvas id="canvas1" width="512" height="512"></canvas> <style> canvas { border: 1px solid black; } </style> <script> var canvas = document.getElementById('canvas1'); var ctx = canvas.getContext('2d'); </script>
Tests:
roundRect
ctx.beginPath() ctx.roundRect(ctx, 10, 10, 200, 100, 20) ctx.fill()
fillRect
ctx.fillRect(10, 10, 200, 100)