]> git.eshelyaron.com Git - emacs.git/commit
Share hash table test structs
authorMattias Engdegård <mattiase@acm.org>
Thu, 2 Nov 2023 16:05:26 +0000 (17:05 +0100)
committerMattias Engdegård <mattiase@acm.org>
Sat, 13 Jan 2024 19:50:38 +0000 (20:50 +0100)
commit7d93a0147a14e14d6964bf93ba11cf494b9d49fd
tree2cce6ad4b4476616e0be3dc1fcf5f68d2ae7692d
parent0a998938ca1b7e5e6f09d14b4a62ec7089be2af6
Share hash table test structs

This saves several words in the hash table object at the cost of an
indirection at runtime.  This seems to be a gain in overall
performance.

FIXME: We cache hash test objects in a rather clumsy way. A better
solution is sought.

* src/lisp.h (struct Lisp_Hash_Table): Use a pointer to the test
struct.  All references adapted.
* src/alloc.c (garbage_collect):
* src/fns.c (struct hash_table_user_test, hash_table_user_tests)
(mark_fns, get_hash_table_user_test): New state for caching test
structs, and functions managing it.
15 files changed:
src/alloc.c
src/bytecode.c
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