aboutsummaryrefslogtreecommitdiffstats
path: root/admin/notes/java
diff options
context:
space:
mode:
authorMattias EngdegÄrd2023-11-04 18:21:06 +0100
committerMattias EngdegÄrd2024-01-13 20:50:38 +0100
commited06de52a53135ee42e528496fdddbf3d74b0479 (patch)
treeee3528ede552b36163055c0fb75da21ac539dff9 /admin/notes/java
parent47502c55b0ce2e4cd3f43fefb77d9c2c11ed7c0a (diff)
downloademacs-ed06de52a53135ee42e528496fdddbf3d74b0479.tar.gz
emacs-ed06de52a53135ee42e528496fdddbf3d74b0479.zip
Faster hash table growth, starting at zero size
The algorithms no longer use the rehash_threshold and rehash_size float constants, but vary depending on size. In particular, the table now grows faster, especially from smaller sizes. The default size is now 0, starting empty, which effectively postpones allocation until the first insertion (unless make-hash-table was called with a positive :size); this is a clear gain as long as the table remains empty. The first inserted item will use an initial size of 8 because most tables are small. * src/fns.c (std_rehash_size, std_rehash_threshold): Remove. (hash_index_size): Integer-only computation. (maybe_resize_hash_table): Grow more aggressively. (Fhash_table_rehash_size, Fhash_table_rehash_threshold): Use the constants directly. * src/lisp.h (DEFAULT_HASH_SIZE): New value.
Diffstat (limited to 'admin/notes/java')
0 files changed, 0 insertions, 0 deletions