[lkml]   [2003]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Define hash_mem in lib/hash.c to apply hash_long to an arbitraty piece of memory.
Neil Brown <> writes:

> +unsigned long hash_mem(void *buf, unsigned int len, unsigned int bits)
> +{
> + int hash = 0;

Shouldn't that be unsigned long?

BTW, in my experience using a good hash function is usually more
important than using a fast hash function. Especially the use of '^'
here could lead to very bad performance in obscure cases because of
bit canceling.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:32    [W:0.041 / U:7.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site