guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scm_string_hash suboptimal?


From: Florian Weimer
Subject: Re: scm_string_hash suboptimal?
Date: 20 May 2001 22:04:01 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

Rob Browning <address@hidden> writes:

> I am not a hash function expert, nor do I play one on TV, but if it's
> helpful, here's the one for strings from RScheme which is based on a
> 1995 algorithm.  Note that it uses some pregenerated data for
> efficiency and includes the code to generate the table.

The table is 1K in size, so there's a danger that it pollutes the data
cache.  The Python hash function doesn't have this problem, and the
integer multiplication shouldn't matter on modern architectures.

I think you have to do a bit of testing using real-world applications
in order to decide which hash function to use.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]