[cairo] Reduce number of floating point operations

Carl Worth cworth at cworth.org
Tue Nov 21 08:38:53 PST 2006


On Tue, 21 Nov 2006 15:56:52 +0200, Jorn Baayen wrote:
>  o is-identity.diff replaces the 6 FP operations to check whether
>    a matrix is an identity matrix with a call to memset().
>
>    This is not always faster.

Shall we just store this data rather than recomputing it? It seems
that an extra byte next to 6 doubles wouldn't be a huge cost, (unless
alignment would make it cost more than that).

We could have various flags in that byte. We definitely check for "is
identity" and "is integer translation" a bunch right now for
optimizations. So being able to do those two operations extremely fast
might be helpful.

Anyway, it's something to check to see if it would help much I think.

> The cairo-perf-diff figures are rather surprising, but this does not
> seem to be caused by differences in circumstances as re-running
> cairo-perf repeatedly results in the same figures.

That is strange. Text is 17% faster but paint with linear gradient is
17% slower.

-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20061121/79c405ec/attachment.pgp


More information about the cairo mailing list