Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/netkey



Generally speaking, the consensus I've seen is that the expense of a
division/modulus operation is higher than the savings from the
improved hashing that a prime gives you, and that you are better off
using algorithms like the ones we use elsewhere in the kernel that use
power of two hash tables rather than prime sized hash tables and
simply bitmask.

Perry

Jun-ichiro itojun Hagino <itojun%netbsd.org@localhost> writes:

> Module Name:  src
> Committed By: itojun
> Date:         Sun Sep 14 03:11:33 UTC 2003
> 
> Modified Files:
>       src/sys/netkey: key.c
> 
> Log Message:
> use prime number to hash SPI
> 
> 
> To generate a diff of this commit:
> cvs rdiff -r1.97 -r1.98 src/sys/netkey/key.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 
> 

-- 
Perry E. Metzger                perry%piermont.com@localhost



Home | Main Index | Thread Index | Old Index