Re: Fixed point cairo.. or no cairo?



On Fri, 2006-08-11 at 09:42 +0100, Michael Meeks wrote:
> On Fri, 2006-08-11 at 10:24 +0300, Jorn Baayen wrote:
> > > Done: http://www.o-hand.com/~jorn/pango-benchmarks/210-softfloat/
> 
> 	Wow - nice :-)

:)

> 
> > Now if we look at the cairo profile here (cairo.txt), we see that 7.7%
> > and 3.8% are you used by __muldf3() and __adddf3(), respectively. These
> > are softfloat functions, confirming suspicions that FP is a problem.
> 
> 	Sure - but we can (I hope) also see that a chunk of these come from a
> small number of code paths, and (possibly) we can optimise that.
> 
> 	The burn in:
> 
>   12        5.0420  libcairo.so.2.9.0        _cairo_pattern_transform
>   28       11.7647  libcairo.so.2.9.0        _cairo_color_init_rgba
>   152      63.8655  libcairo.so.2.9.0        cairo_matrix_transform_point
>   372       7.6559  libcairo.so.2.9.0        __muldf3
> 
> 	Seems to have some lying stack pieces ;-) but presumably the muls are
> from either the (inlined) cairo_matrix_transform_distance, or from
> cairo_matrix_multiply ?

Both of them (among others). cairo_matrix_transform_point() uses
cairo_matrix_transform_distance(), and for example
_cairo_gstate_translate() uses cairo_matrix_multiply().

This piece of the profile is just showing the various places where
__muldf3() is called.

> 	Is the common case of that a multiplication by a unit matrix, [ ie. a
> no-op ;-] that could be elided if that's detectable /  propagate-able ?
> [ though it seems there is no space in 'matrix' to ram an 'unsigned int
> is-unit : 1' into ;-) Or is it perhaps a simple scaling [ reduce by 2x
> the muls ? ].

I'm not so sure. Carl?

> 	Anyhow - it's wonderful to see a clearer profile; though the numbers
> are slightly confusing - is it the case that the pango_cairo_fc_ stuff
> is burning way more emulated fpu ?

Looks like it, yes. There's lots of conversion from cairo doubles to
pango ints going on there using the PANGO_UNITS() macro:

#define PANGO_UNITS(Double) ((int)((Double) * PANGO_SCALE + 0.49999))


Thanks,

Jorn

> 
> 	Regards,
> 
> 		Michael.
> 
-- 
OpenedHand Ltd.
http://o-hand.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]