Canvas Image
JavaScript performance comparison
Preparation code
<canvas width="800" height="600" id="canvas"></canvas>
<script>
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var images = [new Image(), new Image(), new Image(), new Image()];
var w = canvas.width,
h = canvas.height;
images[0].src = 'http://www.w3.org/html/logo/downloads/HTML5_Badge_512.png';
images[1].src = 'http://www.w3.org/html/logo/downloads/HTML5_Badge_128.png';
images[2].src = 'http://www.w3.org/html/logo/downloads/HTML5_Badge_32.png';
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Large Image |
|
pending… |
Medium Image |
|
pending… |
Small Image |
|
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 3: published
0 comments