mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-11 11:42:51 -08:00
By keeping more bytes from the hash key in a package hash table we spare more calls to string_eq().
This commit is contained in:
parent
8659e4e4e7
commit
3dd7d345d1
1 changed files with 2 additions and 2 deletions
|
|
@ -287,7 +287,7 @@ ecl_search_hash(cl_object key, cl_object hashtable)
|
|||
default: corrupted_hash(hashtable);
|
||||
}
|
||||
i = h % hsize;
|
||||
h = h & 0xFFFF;
|
||||
h = h & 0xFFFFFFF;
|
||||
for (k = 0; k < hsize; i = (i + 1) % hsize, k++) {
|
||||
e = &hashtable->hash.data[i];
|
||||
hkey = e->key;
|
||||
|
|
@ -371,7 +371,7 @@ add_new_to_hash(cl_object key, cl_object hashtable, cl_object value)
|
|||
if (e[i].key == OBJNULL) {
|
||||
hashtable->hash.entries++;
|
||||
if (htest == htt_pack)
|
||||
e[i].key = MAKE_FIXNUM(h & 0xFFFF);
|
||||
e[i].key = MAKE_FIXNUM(h & 0xFFFFFFF);
|
||||
else
|
||||
e[i].key = key;
|
||||
e[i].value = value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue