canvas drawing
JavaScript performance comparison
Preparation code
<script>
Benchmark.prototype.setup = function() {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext("2d");
canvas.width = 640;
canvas.height = 480;
var fullImage = new Image();
fullImage.src = "http://warp.povusers.org/pics/GlowTest.jpg";
fullImage.width = 640;
fullImage.height = 480;
var overImage = new Image();
overImage.src = "http://www.sikhnet.com/thegallery/gallery/d/355-2/20060526DuskAtHarimandirSahib-1024x768.jpg";
overImage.width = 1024;
overImage.height = 768;
var quarterImage = new Image();
quarterImage.src="http://www.kespia.com/pictures/Test_Drive_Unlimited_320x240.jpg";
overImage.width = 320;
overImage.height = 240;
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
overImage |
|
pending… |
fullImage |
|
pending… |
tiled |
|
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 and last updated
0 comments