mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-30 16:17:02 +01:00
gpgscm: Tune the hash tables.
* tests/gpgscm/scheme.c (oblist_initial_value): Increase the size of the hash table based on the number of symbols used after initializing the interpreter. (new_frame_in_env): Increase the size of the hash table based on the number of variables in the global environement. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
b85d509a8f
commit
2e78aa6ff7
@ -1073,7 +1073,9 @@ static int hash_fn(const char *key, int table_size);
|
||||
|
||||
static pointer oblist_initial_value(scheme *sc)
|
||||
{
|
||||
return mk_vector(sc, 461); /* probably should be bigger */
|
||||
/* There are about 768 symbols used after loading the
|
||||
* interpreter. */
|
||||
return mk_vector(sc, 1009);
|
||||
}
|
||||
|
||||
/* Add a new symbol NAME at SLOT. SLOT must be obtained using
|
||||
@ -2642,9 +2644,9 @@ static void new_frame_in_env(scheme *sc, pointer old_env)
|
||||
{
|
||||
pointer new_frame;
|
||||
|
||||
/* The interaction-environment has about 300 variables in it. */
|
||||
/* The interaction-environment has about 480 variables in it. */
|
||||
if (old_env == sc->NIL) {
|
||||
new_frame = mk_vector(sc, 461);
|
||||
new_frame = mk_vector(sc, 751);
|
||||
} else {
|
||||
new_frame = sc->NIL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user