[Top][All Lists]

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

Re: size of symbol table?

From: Dirk Herrmann
Subject: Re: size of symbol table?
Date: Thu, 5 Oct 2000 11:01:58 +0200 (MEST)

On Mon, 2 Oct 2000, Han-Wen Nienhuys wrote:

> symbol.c
>       /* NUM_HASH_BUCKETS is the number of symbol scm_hash table buckets. 
>        */
>       #define NUM_HASH_BUCKETS 137
> Is there any reason to use this value? LilyPond became about 10%
> faster when I changed 137 into 769. Would it hurt to have this
> settable as a variable?

IMO, it shouldn't be a constant value anyway.  The best solution would be
to use hashtables that automatically adjust their size.  Especially when
dealing with multiple top level environments the sizes of these
environments may vary greatly.  For example, the environment that is used
for interactive evaluations is likely to have a large number of bindings.  
In contrast, an environment that exports a certain feature may have just a
handful of bindings, such that a hash table with 137 buckets may be ten
times too large.

There exists an implementation for self-adjusting hash tables by Jay
Glascoe, but it hasn't been added to guile yet.

Best regards

reply via email to

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