Subject: Re: CVS commit: src/sys/netkey
To: None <>
From: Perry E. Metzger <>
List: source-changes
Date: 09/14/2003 03:12:06
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.


Jun-ichiro itojun Hagino <> 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