image-vs-text

JavaScript performance comparison

Revision 6 of this test case created

Preparation code

<canvas id="canvas1" width="500" height="500"></canvas>

<script>
var can = document.getElementById('canvas1');
var ctx = can.getContext('2d');
var img = new Image();
img.src = "http://placekitten.com/100/100";
ctx.font = '72pt Verdana';
img.onload = function() {
  ctx.drawImage(img, 0, 0);
}

</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
text
ctx.fillText('20.25', 100, 100);
pending…
image
  ctx.drawImage(img, 0, 0);
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:

0 comments

Add a comment