Date: Mon, 29 Jan 2001 14:23:44 -0800 (PST) From: Matt Dillon <dillon@earth.backplane.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Bakul Shah <bakul@bitblocks.com>, hackers@FreeBSD.ORG Subject: Re: [kernel patch] fcntl(...) to close many descriptors Message-ID: <200101292223.f0TMNix76932@earth.backplane.com> References: <24885.980806357@critter>
next in thread | previous in thread | raw e-mail | index | archive | help
: :They say so in their book: : :http://www.amazon.com/exec/obidos/ASIN/0805316701/qid=980806275/sr=1-28/ref=sc_b_28/104-5366240-4220700 : : :-- :Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 :phk@FreeBSD.ORG | TCP/IP since RFC 956 :FreeBSD committer | BSD since 4.3-tahoe And they are right. When I wrote DICE (Ansi C compiler for the Amiga), I tried to use something similar to a perfect hash for keyword and string element references in the lexer token, to reduce the amount of meta-data I needed to store in the token. I thought it would be very cool, but it turned out not to help at all. It actually made debugging more difficult. I wound up simply using a string table and converting strings to a pointer into the string table. This worked a whole lot better. USENET news systems, including my own Diablo, use a big hash with a low probability of conflict to map the message-id's into the history database. Diablo used a 64 bit CRC. I believe INN has moved to using MD5's. These are not perfect hashes but the serve much the same purpose - reducing a variable length string into a constant-length key. I would argue that the hash/key construct is useful when you are dealing with millions or hundreds of millions of discrete pieces of information (as a news system must), but not so useful for something like a syscall table where long term portability is more important. If you need syscalls for experimental ops, just assign high syscall numbers not likely to be used by others during your experiment. It's no biggy. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101292223.f0TMNix76932>