[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/hash-table-perf e6defe82569 27/35: Change default hash table siz
From: |
Mattias Engdegård |
Subject: |
scratch/hash-table-perf e6defe82569 27/35: Change default hash table size to 8 (from 65) |
Date: |
Thu, 4 Jan 2024 10:56:43 -0500 (EST) |
branch: scratch/hash-table-perf
commit e6defe825693bf9090151195e85f6b388f70fe64
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>
Change default hash table size to 8 (from 65)
Most tables are small so 65 was much too large.
* src/lisp.h (DEFAULT_HASH_SIZE): New value.
---
src/fns.c | 3 ++-
src/lisp.h | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/fns.c b/src/fns.c
index 1a73353b70d..3bf9146f9da 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5386,7 +5386,8 @@ keys. Default is `eql'. Predefined are the tests `eq',
`eql', and
`define-hash-table-test'.
:size SIZE -- A hint as to how many elements will be put in the table.
-Default is 65.
+The table will always grow as needed; this argument may help performance
+slightly if the size is known in advance but is never required.
:weakness WEAK -- WEAK must be one of nil, t, `key', `value',
`key-or-value', or `key-and-value'. If WEAK is not nil, the table
diff --git a/src/lisp.h b/src/lisp.h
index 00d03ccb9e5..083733429ed 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2563,7 +2563,7 @@ void hash_table_thaw (Lisp_Object hash_table);
/* Default size for hash tables if not specified. */
-enum DEFAULT_HASH_SIZE { DEFAULT_HASH_SIZE = 65 };
+enum DEFAULT_HASH_SIZE { DEFAULT_HASH_SIZE = 8 };
/* Combine two integers X and Y for hashing. The result might exceed
INTMASK. */
- scratch/hash-table-perf f3e985a16ba 14/35: Don't print or read the hash table size parameter, (continued)
- scratch/hash-table-perf f3e985a16ba 14/35: Don't print or read the hash table size parameter, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 1ebd00f6d0a 21/35: Retype hash interfaces to use EMACS_UINT instead of Lisp fixnum, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf fc68176120f 24/35: Use hash_hash_t for storing hash values, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 4b5d9f92abe 13/35: * src/print.c (print_object): Don't print empty hash-table data, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 310f6584ccb 18/35: Allow zero hash table size, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf e53398ab698 26/35: ; Reorder structs (hash and test), Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 4e8d7725fd4 11/35: ; * src/fns.c (Fmake_hash_table): ensure `test` is a bare symbol, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 8335891387a 22/35: Inlined and specialised hash table look-up, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 54807fee4d0 23/35: Use hash_idx_t for storing hash indices, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 8cd35079f4c 34/35: Don't pretend that hash-table-size is useful, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf e6defe82569 27/35: Change default hash table size to 8 (from 65),
Mattias Engdegård <=
- scratch/hash-table-perf 422c91a822a 02/35: ; * src/pdumper.c (dump_hash_table): Remove unused argument., Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 3d2042c48a6 07/35: Refactor: extract hash index computation to a function, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf c188b9f2bf5 08/35: Refactor hash table vector reallocation, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 6ffbccbf1dd 15/35: Represent hash table weakness as an enum internally, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 3e9e68333ae 16/35: Remove rehash-threshold and rehash-size struct members, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 8e80d1930e3 20/35: Store hash values as EMACS_UINT instead of Lisp_Object, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 05297736aa6 33/35: Adapt hash functions to produce a hash_hash_t eventually, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 830838eb5f3 31/35: Use KEY=Qunbound instead of HASH=hash_unused for unused entries, Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 8b1b140bed9 32/35: * src/lisp.h (hash_hash_t): Change to uint32_t., Mattias Engdegård, 2024/01/04
- scratch/hash-table-perf 681a2877cc2 35/35: Hash-table documentation updates, Mattias Engdegård, 2024/01/04