Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Aug 2002 22:59:47 +0100
From:      David Malone <dwmalone@maths.tcd.ie>
To:        Mike Harding <mvh@netcom.com>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/42167: du uses linear search for duplicate inodes - very slow!
Message-ID:  <20020831215946.GB34455@walton.maths.tcd.ie>
In-Reply-To: <200208310300.g7V30AUT094327@freefall.freebsd.org>
References:  <200208310300.g7V30AUT094327@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 30, 2002 at 08:00:10PM -0700, Mike Harding wrote:
>  Here's a unified diff, for perusal by the merely curious... the general 
>  approach is to replace the single unordered list with HASHSIZE unordered 
>  lists.  The hashing function is a simple divide, which should be 
>  sufficient as inodes should be very evenly distributed (sequential, 
>  no?).  The use of 'abs' below may be unnecessary if ino_t is guaranteed 
>  to be unsigned, I am unaware of convention here...

I wonder if it would be better to use something like a heap or some
sort of tree, rather than a fixed size hash table?

	David.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020831215946.GB34455>