[PATCH] Use new pixman_glyph_cache_t API that will be in pixman 0.28.0

Søren Sandmann sandmann at cs.au.dk
Wed May 30 20:45:42 PDT 2012


Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> I note the pixman patches use a custom hash function instead of the standard
> SHA1 hash the X server currently uses (and currently tries to find an
> accelerated version of) - any idea if this factors into the performance at all?

Well, the hashes serve two different purposes. In the X server, the hash
is used to identify identical glyphs uploaded from different
applications, which means it has to be collision resistant. In pixman,
it's just a regular old hash table, where collisions are undesirable,
but not the end of the world.

So the performance improvements don't come from the hash function at
all. In fact the code that fbGlyphs() replaces doesn't do any hash
lookups at all.

The hash function used in pixman does show up on some profiles, but only
at around 2%.


Søren


More information about the xorg-devel mailing list