canvas-clear
JavaScript performance comparison
Info
Different methods for clearing the canvas.
Preparation code
<script>
var c = document.createElement('canvas');
c.width = c.height = 500;
var ctx = c.getContext('2d');
ctx.fillStyle = 'rgba(0,0,0,1)';
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
clearRect |
|
pending… |
fillRect |
|
pending… |
set width |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by Ilmari Heikkinen
- Revision 3: published by Rob Boerman
0 comments