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

2005-12-07 Thread felix winkelmann
On 12/6/05, Eric Hanchrow [EMAIL PROTECTED] wrote: 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). You can create a

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

2005-12-06 Thread Eric Hanchrow
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

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

2005-08-03 Thread Alejandro Forero Cuervo
Is there a paper or book that offers a convincing, empirical argument for this? I've read and heard this exhortation before but the justification in the presence well designed hash and rehash functions has always been just to be safe. Well, I don't know of any papers or books, but I

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

2005-08-02 Thread Ed Watkeys
On Aug 2, 2005, at 10:50 AM, Nelson Castillo wrote: On 8/1/05, Ed Watkeys [EMAIL PROTECTED] wrote: _The Practice of Programming_ (Kernighan Pike) deals with a situation analgous to this; they grow storage for a string by powers of two. This works well because it heavily tests the algorithm

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

2005-08-02 Thread Ed Watkeys
On Aug 2, 2005, at 5:09 PM, Toby Butzon wrote: On Tue, Aug 02, 2005 at 05:22:54PM -0400, Ed Watkeys wrote: Yup. But you really should use prime numbers for hash tables. Is there a paper or book that offers a convincing, empirical argument for this? I've read and heard this exhortation

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

2005-08-02 Thread Alejandro Forero Cuervo
When, on the other hand, n is prime, o is always 1 so you won't need to worry about this (you'll just need to worry that no single value from hash(A) occurs more often than others). Erm, o is always 1 or n. I'll leave it up to you to figure out what happens when o is n. Alejo.

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

2005-08-01 Thread Reed Sheridan
.) Date: Fri, 29 Jul 2005 10:01:42 -0500 From: Alejandro Forero Cuervo [EMAIL PROTECTED] Subject: Re: [Chicken-users] Better algorithm for growing hash tables To: [EMAIL PROTECTED], chicken-users@nongnu.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii (use srfi

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

2005-08-01 Thread Alejandro Forero Cuervo
That explains Chicken's pathetic performance in the spellcheck benchmark in the alioth shootout ( http://shootout.alioth.debian.org/benchmark.php?test=spellchecklang=allsort=fullcpu ) - dead last, at 35.4 seconds, compared to 16.9 seconds for the next slowest language. It's writing and

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

2005-08-01 Thread Ed Watkeys
On Aug 1, 2005, at 4:52 PM, Alejandro Forero Cuervo wrote: That explains Chicken's pathetic performance in the spellcheck benchmark in the alioth shootout ( http://shootout.alioth.debian.org/benchmark.php? test=spellchecklang=allsort=fullcpu ) - dead last, at 35.4 seconds, compared to 16.9