chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] Re: Better algorithm for growing hash tables


From: Eric Hanchrow
Subject: [Chicken-users] Re: Better algorithm for growing hash tables
Date: Mon, 05 Dec 2005 23:30:23 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.51 (gnu/linux)

I too am suffering from very slow hash tables.  I'm brand-new to
chicken (although not to scheme) so it's possible that I'm doing
something wrong.

The gist of the problem is: I'm using bignums (from the "numbers")
extension as the hash table key; I created the table with
(make-hash-table =); I'm reading lines from /usr/share/dict/words, and
for each line, I'm computing a number, and using that number as the
hash key, and the word as the value.

It starts out storing perhaps 300 words per second, then gets
progressively slower; as I write this, it's storing perhaps 30 words
per second (the hash table has about 34,000 entries).

I'm using version 212 (which I got from darcs), so I expect all the
patches that have been previously mentioned have already been applied.

I'm happy to make the code available if anyone's interested (it's
small).

Any ideas how I can speed this up?
-- 
Paul Graham is right.
        --Shriram Krishnamurthi





reply via email to

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