Re: Glib bithacks



On Fri, 2005-11-04 at 20:23 -0500, Behdad Esfahbod wrote:
> +#define IS(Type, Class)        (((guint)1 << (Type)) & (Class) ?
> 1 : 0)
> +#define OR(Type, Rest) (((guint)1 << (Type)) | (Rest))

Very cute!  How are the timings for this?

It looks like we need to make pango-language-profile.c more general, so
that it's easy to plug in various benchmarks into the
gimme-all-the-languages code.

The generic part of pango-language-profile is the StringSet code, and
these functions:

	run_all_languages()
	run_some_languages()
	run_one_language()

The pango-specific test is measure_strings().  It takes a StringSet and
runs its contents through PangoLayout.

Would you like to pull out all the generic code and probably change the
run_*_languages() functions to take a callback?  Something like

  run_all_languages (pango_specific_benchmark_fn);

... then people would find it easier to plug in other benchmarks, like
your wonderful stuff for Glib.

  Federico




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