[PATCH] resource: Micro-tune resource hash computation

Guillem Jover guillem at hadrons.org
Wed Jan 12 11:27:33 PST 2011


Hi!

On Mon, 2011-01-10 at 17:31:28 -0500, Adam Jackson wrote:
> We do actually call Hash() on resource lookup, so let's not make it more
> expensive than necessary.  The compiler isnmay not be smart enough to
                                            ^ typo
> notice that we only ever have a power of two count of buckets, so
> flatten the log2 math so it doesn't have to know.
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>

Why not squash this patch with

[PATCH 3/5] resource: Remove a redundant field from client resource tracking

and replace MAXHASHSIZE with MAXBUCKETS 2048, thus removing the need for
ilog2 entirely?

regards,
guillem


More information about the xorg-devel mailing list