[cairo] On _cairo_path_buf_fixed
Behdad Esfahbod
behdad at behdad.org
Sat May 10 00:14:21 PDT 2008
On Sat, 2008-05-10 at 07:09 +0100, Chris Wilson wrote:
> On Fri, 2008-05-09 at 22:55 +0200, Behdad Esfahbod wrote:
> > Chris,
> >
> > In the following struct:
> >
> > typedef struct _cairo_path_buf_fixed {
> > cairo_path_buf_t base;
> >
> > cairo_path_op_t op[CAIRO_PATH_BUF_SIZE];
> > cairo_point_t points[2 * CAIRO_PATH_BUF_SIZE];
> > } cairo_path_buf_fixed_t;
> >
> > Any reason to have the points array twice longer than the ops?
>
> Only that when I measured the relative frequency for heavy path
> constructors (those actually needed more than the embedded buf) it was
> close to 2. Hmm, YMMV, so I should start putting my benchmarks online.
Well, if you have flat path only, it's 1:1, if you have curve only, 1:3.
A mix, prolly close to 1:2. But I'm more interested in minimising the
worst case waste.
--
behdad
http://behdad.org/
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo
mailing list