]> git.eshelyaron.com Git - emacs.git/commit
Remove rehash-threshold and rehash-size struct members
authorMattias Engdegård <mattiase@acm.org>
Thu, 26 Oct 2023 15:17:01 +0000 (17:17 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sat, 13 Jan 2024 19:50:37 +0000 (20:50 +0100)
commitc3d0cc50faf588479db62e20ceabe044dd89e244
tree32333d6369a1cddf1799a00ba46bd22d26d473af
parentc6bdc1ea1dc7f9a0b6d92d443f34c42affde73d1
Remove rehash-threshold and rehash-size struct members

These parameters have no visible semantics and are hardly ever used,
so just use the default values for all hash tables.  This saves
memory, shrinks the external representation, and will improve
performance.

* src/fns.c (std_rehash_size, std_rehash_threshold): New.
(hash_index_size): Use std_rehash_threshold.  Remove table argument.
All callers updated.
(make_hash_table): Remove rehash_size and rehash_threshold args.
All callers updated.
(maybe_resize_hash_table)
(Fhash_table_rehash_size, Fhash_table_rehash_threshold):
Use std_rehash_size and std_rehash_threshold.
(Fmake_hash_table): Ignore :rehash-size and :rehash-threshold args.
* src/lisp.h (struct Lisp_Hash_Table):
Remove rehash_size and rehash_threshold fields.
(DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE): Remove.
* src/lread.c (hash_table_from_plist): Don't read rehash-size or
rehash-threshold.
(syms_of_lread): Remove unused symbols.
* src/print.c (print_object): Don't print rehash-size or rehash-threshold.
* src/pdumper.c (dump_hash_table): Don't dump removed fields.
13 files changed:
src/category.c
src/emacs-module.c
src/fns.c
src/frame.c
src/image.c
src/lisp.h
src/lread.c
src/pdumper.c
src/pgtkterm.c
src/print.c
src/profiler.c
src/xfaces.c
src/xterm.c