]> 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)
committerEshel Yaron <me@eshelyaron.com>
Sun, 14 Jan 2024 15:15:37 +0000 (16:15 +0100)
commit120a7a6f4a98e81a150634be87e5601e354d3aa8
tree30cb48bbbd673891639fd06c1cdd7903d3161ae8
parentef1f0f5f3196a22829b0029e7f91caebc0992979
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.

(cherry picked from commit c3d0cc50faf588479db62e20ceabe044dd89e244)
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