[cairo] [PATCH] scaled-font: optimize cairo_scaled_font_text_to_glyphs()

Behdad Esfahbod behdad at behdad.org
Thu Jun 10 10:17:00 PDT 2010


Now that I think about it, isn't that function only called in the toy text
path?  In that case I suggest removing any optimization from it.  No one
should be calling the toy text api anyway.

behdad

On 06/09/2010 06:14 PM, Chris Wilson wrote:
> On Wed, 09 Jun 2010 14:38:38 -0400, Behdad Esfahbod <behdad at behdad.org> wrote:
>> Perhaps I should dig into the git history to find what were the supporting
>> numbers when the cache was added in the first place.  Appreciate any pointers
>> (Chris added this I assume).
> 
> Naughty me, I didn't log them, I remember working on the basis of a 30%
> cache hit rate, which was enough to cover its cost. The direct cache is
> there to simply reduce the overhead of the hash table scaled glyph lookup.
> I've trimmed little bits off the cost of glyph init and other overhead
> during the lookup, not a lot but measurable (if only with callgrind at
> times) but I've yet to find a quicker ht. Some of the techniques to stuff
> a few bits of the hash into the pointer look promising, but the chain
> length is usually so short that I haven't even bothered experimenting. All
> improvement is gratefully accepted, even an outright removal if the lookup
> is fast enough to stand on its own -- which is my primarily reason for
> capturing the benchmarks in use.
> -ickle
> 


More information about the cairo mailing list