Re: Fixed point cairo.. or no cairo?



On Tue, 2006-08-22 at 09:20 +0100, Michael Meeks wrote:
> On Mon, 2006-08-21 at 23:11 -0400, Behdad Esfahbod wrote:
> > This just confirmed that an optimized branch on x86 is basically free:
> 
> 	Which is to be expected; at least with a separate integer unit & FPU
> [ all modern desktop CPUs ], but it's good to have measured that.
> 
> 	Of course the memory fetch may not be quite so cheap, and the space
> cost of adding an extra byte ( -> 4/8 bytes for alignment ) at the end
> of each matrix may be measurable; hence the suggestion of separating the
> flags [ which would also avoid translation to/from cairo_matrix_t's ].

The problem with separate flags is that you either have to recompute
them all the time, or risk getting them out of synch.  Keeping them
around makes more sense to me (instead of say, computing them on each
show_glyphs), and in that case a separate matrix type doesn't waste
(much) more.  Converting to "const cairo_matrix_t" is free, and
converting from it is just copying a cairo_matrix_t (which we do all the
time) plus caching the props (that you can do lazily too.)

> 	Regards,
> 
> 		Michael.
> 
-- 
behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
        -- Dan Bern, "New American Language"




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