[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: Better algorithm for growing hash tables
From: |
Reed Sheridan |
Subject: |
[Chicken-users] Re: Better algorithm for growing hash tables |
Date: |
Mon, 1 Aug 2005 02:11:20 -0500 |
That explains Chicken's pathetic performance in the spellcheck
benchmark in the alioth shootout (
http://shootout.alioth.debian.org/benchmark.php?test=spellcheck&lang=all&sort=fullcpu
) - dead last, at 35.4 seconds, compared to 16.9 seconds for the next
slowest language. It's writing and reading ~39000 entries into a
10000 size hash table, with this dumb algorithm. By changing the size
to 80000, on my machine the time for this benchmark goes from 42.7
seconds to .862 seconds, which would put Chicken near the top (I also
replaced cute with (lambda (x) ...), but that's a much smaller
factor.)
> Date: Fri, 29 Jul 2005 10:01:42 -0500
> From: Alejandro Forero Cuervo <address@hidden>
> Subject: Re: [Chicken-users] Better algorithm for growing hash tables
> To: address@hidden, address@hidden
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> > > (use srfi-1)
> > > (define hash (make-hash-table))
> > > (for-each (lambda (n) (hash-table-set! hash hash n)) (iota 1000000))
>
> Erm, I meant
>
> (for-each (lambda (n) (hash-table-set! hash n #f)) (iota 1000000)) ,
>
> of course.
>
> Alejo.
> http://azul.freaks-unidos.net/
>
> ---=( Comunidad de Usuarios de Software Libre en Colombia )=---
> ---=( http://bachue.com/colibri )=--=( address@hidden )=---
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 189 bytes
> Desc: Digital signature
> Url :
> http://lists.gnu.org/pipermail/chicken-users/attachments/20050729/9fa873ee/attachment.bin
>
> ------------------------------
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>
>
> End of Chicken-users Digest, Vol 32, Issue 23
> *********************************************
>
- [Chicken-users] Re: Better algorithm for growing hash tables,
Reed Sheridan <=
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Alejandro Forero Cuervo, 2005/08/01
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Ed Watkeys, 2005/08/01
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Nelson Castillo, 2005/08/02
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Ed Watkeys, 2005/08/02
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Toby Butzon, 2005/08/02
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Ed Watkeys, 2005/08/02
- Message not available
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Ed Watkeys, 2005/08/03
- Re: [Chicken-users] Re: Better algorithm for growing hash tables, Alejandro Forero Cuervo, 2005/08/03