render-vs-prerender
JavaScript performance comparison
Preparation code
<canvas id="canvas1" width="640" height="480"></canvas>
<script>
var can = document.getElementById('canvas1');
var ctx = can.getContext('2d');
var can2 = document.createElement('canvas');
can2.width = 200;
can2.height = 40;
var ctx2 = can2.getContext('2d');
var can3 = document.createElement('canvas');
can3.width = 90;
can3.height = 40;
var ctx3 = can3.getContext('2d');
function render(context) {
context.font = "20pt Arial";
context.fillStyle = "black";
context.fillText('Hello World', 50, 50);
}
render(ctx2);
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
render |
|
pending… |
pre-rendered snug |
|
pending… |
pre-rendered loose |
|
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 Simon
- Revision 2: published
- Revision 3: published by Boris
- Revision 4: published
- Revision 5: published
- Revision 7: published
- Revision 8: published
- Revision 9: published
- Revision 10: published by Canvas integer coordinates vs. coordinates + .5
- Revision 11: published by Canvas integer coordinates vs. coordinates + .5
- Revision 12: published by Canvas integer coordinates vs. coordinates + .5
- Revision 13: published by Canvas integer coordinates vs. coordinates + .5
- Revision 14: published by Canvas integer coordinates vs. coordinates + .5
- Revision 15: published by Bhavesh Bagadiya
- Revision 16: published by Canvas integer coordinates vs. coordinates + .5
- Revision 17: published by Bhavesh Bagadiya
- Revision 18: published
- Revision 20: published
- Revision 21: published
- Revision 22: published
- Revision 23: published
- Revision 26: published
- Revision 27: published
- Revision 28: published
- Revision 29: published
- Revision 30: published
- Revision 31: published
- Revision 32: published
- Revision 33: published
- Revision 44: published
- Revision 45: published
- Revision 47: published by Hairo
- Revision 48: published
- Revision 49: published
0 comments