[cairo] Text performance on windows?

Damian Frank damian.frank at gmail.com
Tue Aug 26 10:38:49 PDT 2008


By the way, I apologize for the email volume, but I wanted to attach my
latest performance tests.  These are based on a quick and dirty "render as
many glyphs as possible in one second" test, using the same string at the
same position, run on a 2GHz Core 2 Duo.  gdi, d3d, and gdi+ refer to other
back-ends we have already implemented, performing the same operations.  This
benchmark should only include time spent rendering text, not swapping
buffers or anything like that.

I find it quite interesting that dib is faster than ddb.  In particular, the
ExtTextOutW call is tremendously slower, and yet the DDB case seems to incur
much more overhead in cairo_gstate_show_text_glyps for the DDB case.  Is
this to be expected?

Running a render-as-many-glyphs-in-1-sec-as-possible test:
 cairo ddb:     90K g/s
 cairo dib24:  114K g/s
 cairo dib32:   66K g/s
 cairo image:   75K g/s
 gdi:          965K g/s
 d3d:           49K g/s
 gdi+:         432K g/s


Some timings using QueryPerformanceCounter:
ddb:
         ExtTextOutW: last:      8 avg:    8.5  min:      6  max:   2163
     cairo_show_text: last:    969 avg: 1012.6  min:    833  max:  86489
 c_gs_text_to_glyphs: last:    404 avg:  431.7  min:    385  max:  85762
 c_gs_show_tx_glyphs: last:    540 avg:  555.0  min:    420  max:  58285

dib24:
         ExtTextOutW: last:    222 avg:  247.7  min:    198  max:  15359
     cairo_show_text: last:    737 avg:  786.3  min:    709  max:  15064
 c_gs_text_to_glyphs: last:    394 avg:  427.7  min:    384  max:  11327
 c_gs_show_tx_glyphs: last:    314 avg:  332.8  min:    297  max:   9396

dib32:
     cairo_show_text: last:   1203 avg: 1294.8  min:   1167  max:   9301
 c_gs_text_to_glyphs: last:    397 avg:  430.3  min:    384  max:   5215
 c_gs_show_tx_glyphs: last:    782 avg:  839.5  min:    754  max:   7481

image:
     cairo_show_text: last:   1073 avg: 1145.6  min:   1051  max:  51262
 c_gs_text_to_glyphs: last:    387 avg:  406.0  min:    383  max:   3776
 c_gs_show_tx_glyphs: last:    662 avg:  715.1  min:    640  max:  50815
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080826/12450943/attachment.htm 


More information about the cairo mailing list