[PATCH] resource: Micro-tune resource hash computation
Fernando Carrijo
fcarrijo at freedesktop.org
Tue Jan 11 05:15:07 PST 2011
Adam Jackson <ajax at redhat.com> 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
> 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>
Reviewed-by: Fernando Carrijo <fcarrijo at freedesktop.org>
More information about the xorg-devel
mailing list