vektor at dumbterm.net
Mon Aug 15 21:29:54 PDT 2005
When running some line and text drawing benchmarks under cairo, a
curious symbol that's often near the top is "__divdi3". This is a gcc
symbol which implements 64 bit division. For the 'textpath' 
benchmark to an image surface, oprofile puts it at 16% on my machine.
divdi3 can be found here in cairo:
- Computing the position along a line.
- This is the major offender.
- Calculating the factor for the shader function.
- Currently unused.
It can also be found here in pixman:
- 64 bit division is used when moving along a line. This is the
second worst offender.
- Used for bilinear interpolation, at least, two per pixel. Ugh.
- Position along a line, same as cairo-traps.c.
- Currently unused, I think.
Changing the calculations in renderedge.c and cairo-traps.c speeds up
my textpath benchmark by 16%, so the overhead seems quite significant.
Does anyone have any thoughts on how we can improve this? We could
probably reduce many of these to 32 bits, but I am wondering if there
are some higher-level optimizations that might be appropriate here.
 Intel P4 3.00GHz, model 4, stepping 1
More information about the cairo