From owner-freebsd-hackers Mon Jan 29 13: 8:14 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 916B637B6C1 for ; Mon, 29 Jan 2001 13:07:56 -0800 (PST) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f0TL7kK24291; Mon, 29 Jan 2001 22:07:46 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Bakul Shah Cc: Matt Dillon , hackers@FreeBSD.ORG Subject: Re: [kernel patch] fcntl(...) to close many descriptors In-Reply-To: Your message of "Mon, 29 Jan 2001 12:59:53 PST." <3A75D9C9.1C59ACBA@bitblocks.com> Date: Mon, 29 Jan 2001 22:07:46 +0100 Message-ID: <24289.980802466@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <3A75D9C9.1C59ACBA@bitblocks.com>, Bakul Shah writes: >This caught my eye: > >> Besides, there is no such thing as a >> perfect hash ... at least not one that has a small enough index range >> to be useful in a table lookup. > >If you can get to old CACMs see `Minimal Perfect Hash Functions Made Simple' >by Richard J. Cichelli, Comm. of ACM, Jan 1980. AFAIK gperf uses some >variation of that algorithm and may have some details. A minimal perfect hash >function is only worth it (IMHO) when the set of input keys is mostly fixed and >the hash function is used many many times (e.g. programming language keywords). And even then it's seldom worth it according to the people behind the LCC compiler... -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message