:
: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
:[EMAIL PROTECTED] | 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message