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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36 OPR/122.0.0.0 (Edition developer)
Browser:
Opera 122
Operating system:
Windows
Device Platform:
Desktop
Date tested:
10 months ago
Test name
Executions per second
roundRect
1916487.8 Ops/sec
fillRect
1214753.8 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)