Date: Tue, 29 Apr 1997 12:17:25 -0400 (EDT) From: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com> To: ponds!zeta.org.au!bde, michaelh@cet.co.jp Cc: ponds!hub.freebsd.org!hackers, ponds!atrad.adelaide.edu.au!msmith Subject: Re: namei & hash functions Message-ID: <199704291617.MAA00794@lakes.water.net>
next in thread | raw e-mail | index | archive | help
> > On Sun, 27 Apr 1997, Bruce Evans wrote: > > > The mask version is the original 4.4Lite version. The prime version is > > supposed to be a FreeBSD enhancement. One would hope that whoever changed > > it did extensive tests :-). > > Umm. I didn't notice it in the logs. Just curious how many integer mults > by 33 equal a integer mod by a prime? > > Mike Hancock > > Well, hmm, let's see. A multiply by 33 becomes a shift-left 5 and an add. A mod by a prime is going to involve a division (there's not much else you can do with a prime number...) which will be _considerably_ slower; possibly involving 32 shifts and as many subtracts (although more likely around 16 or so.) So; my answer would be "lots"; around 16 or so. - Dave Rivers -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704291617.MAA00794>