Looking for high-quality hashing function for dynamic linker

eb@kaleida.com (Eric Benson)
Fri, 28 Jul 1995 21:48:16 GMT

          From comp.compilers

Related articles
Looking for high-quality hashing function for dynamic linker eb@kaleida.com (1995-07-28)
Re: Looking for high-quality hashing function for dynamic linker mw@ipx2.rz.uni-mannheim.de (1995-08-02)
Re: Looking for high-quality hashing function for dynamic linker stefan.monnier@epfl.ch (Stefan Monnier) (1995-08-03)
Re: Looking for high-quality hashing function for dynamic linker haahr@netcom.com (1995-08-03)
Re: Looking for high-quality hashing function for dynamic linker chase@centerline.com (1995-08-03)
| List of all articles for this month |
Newsgroups: comp.compilers,comp.theory,comp.lang.misc,comp.lang.dylan
From: eb@kaleida.com (Eric Benson)
Keywords: theory, question, comment
Organization: Kaleida Labs, Inc.
Date: Fri, 28 Jul 1995 21:48:16 GMT

I'm implementing a dynamic linker for a programming language similar to
Dylan. (The language is ScriptX, see http://www.kaleida.com/ for more
information about it.) It uses a module system that is almost identical
to Dylan's module system. A module can export variables to publish
interfaces, and it can use other modules to gain access to their published
interfaces. Modules can be saved from a compilation environment into a
persistent store with the variables defined within them, and later loaded
into a runtime environment.


I'm looking for a way to quickly verify when loading a module that the
modules with interfaces used by it are available in the runtime
environment and that those interfaces are the same as they were in the
compilation environment. I can do this with guaranteed 100% accuracy by
saving the names of all the variables exported by all the modules used by
the module when saving the module. This could take a lot of time when
loading, which is of course when I really don't want to take a lot of
time.


Is it feasible to compute a signature consisting of a few (say, less than
ten) 32 bit words and use this for comparison instead of the entire set of
names? A false positive comparison would probably result in a severe
malfunction so it should be extremely unlikely, say one-in-a-billion or
less. I can spend a big chunk of CPU time in the compilation environment
to compute this signature if necessary. I have a 29-bit CRC hash function
already available. Is this, or some multi-word variant of it, good enough
for my purposes? If so, does anyone have a larger-than-29-bit CRC
implementation? Does anyone have any references to relevant research?


--
Eric Benson
eb@kaleida.com
[A good 32 bit hash function should give you a 1 in 4 billion chance of a
false match. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.