From owner-freebsd-hackers Sat Apr 26 05:19:40 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id FAA20483 for hackers-outgoing; Sat, 26 Apr 1997 05:19:40 -0700 (PDT) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id FAA20478 for ; Sat, 26 Apr 1997 05:19:38 -0700 (PDT) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.5/CET-v2.1) with SMTP id MAA23719; Sat, 26 Apr 1997 12:19:25 GMT Date: Sat, 26 Apr 1997 21:19:25 +0900 (JST) From: Michael Hancock Reply-To: Michael Hancock To: Michael Smith cc: hackers@hub.freebsd.org Subject: Re: namei & hash functions In-Reply-To: <199704260611.PAA05947@genesis.atrad.adelaide.edu.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Sat, 26 Apr 1997, Michael Smith wrote: > > Not really necessary, GCC can see the constant multiply: > > ... and on top of that, on an architecture where multiplying is faster > than shift, add, it is likely to know this. I also forgot to check the difference in the size of the hash table when using the mask version vs. the prime version. For example, with maxvnodes at 4824, the mask version gives you a hashsize of 4096 while the prime version gives you 4603. I don't know if it's going to make much difference but I'm going to backup and control this experiment a little better. I'll fill the following data points where missing: 1) Original. Done. 2) Mask version only. 3) Double hashsize. nchashtbl = hashinit(desiredvnodes * 2, M_CACHE, &nchash); 4) Mult by 33, mask version. Done. 5) Mult by 33, double hashsize. I have a feeling that 2) is sufficient. I might stop on 3). I just got news that we can start exploring I-405. Mike Hancock