Canvas Draw Image vs fill rect
JavaScript performance comparison
Preparation code
<canvas id="myCanvas" width="600" height="400"></canvas>
<img id="myImg" src="http://upload.wikimedia.org/wikipedia/commons/f/f0/Pixelart-tv-iso.png" />
<script>
Benchmark.prototype.setup = function() {
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');
var img = document.getElementById('myImg');
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Draw Image |
|
pending… |
Fill Rect |
|
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
- Revision 2: published
- Revision 3: published
- Revision 4: published
- Revision 5: published by lump
- Revision 6: published
- Revision 8: published
- Revision 9: published by PlaneWorld
- Revision 10: published
- Revision 11: published
- Revision 12: published
- Revision 13: published
- Revision 14: published
- Revision 15: published
- Revision 16: published
- Revision 17: published
- Revision 18: published
0 comments