diff options
| author | Paul Eggert | 2017-02-21 15:31:29 -0800 |
|---|---|---|
| committer | Paul Eggert | 2017-02-21 15:39:17 -0800 |
| commit | 7207b63c8e290ddec33908ce8d38be5793388318 (patch) | |
| tree | 144d55c7556c9514b4e3690f56f3bae35ab736fc /etc | |
| parent | f2191691d4e814d38369053cdec428ee2142ab18 (diff) | |
| download | emacs-7207b63c8e290ddec33908ce8d38be5793388318.tar.gz emacs-7207b63c8e290ddec33908ce8d38be5793388318.zip | |
Hash table threshold is now float, not double
Change default from 0.8 to 0.8125 so it fits in float without
rounding glitches.
* doc/lispref/hash.texi (Creating Hash):
* doc/lispref/objects.texi (Hash Table Type):
* etc/NEWS:
Document change.
* src/fns.c (make_hash_table, maybe_resize_hash_table)
(Fmake_hash_table): Threshold is now float, not double.
Be consistent about how this is rounded.
* src/lisp.h (struct Lisp_Hash_Table.rehash_threshold):
Change back to float, now that the other code rounds consistently.
(DEFAULT_REHASH_THRESHOLD): Now float 0.8125 instead of double 0.8.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/NEWS | 4 |
1 files changed, 4 insertions, 0 deletions
| @@ -904,6 +904,10 @@ consistency with the new functions. For compatibility, 'sxhash' | |||
| 904 | remains as an alias to 'sxhash-equal'. | 904 | remains as an alias to 'sxhash-equal'. |
| 905 | 905 | ||
| 906 | +++ | 906 | +++ |
| 907 | ** 'make-hash-table' now defaults to a rehash threshold of 0.8125 | ||
| 908 | instead of 0.8, to avoid rounding glitches. | ||
| 909 | |||
| 910 | +++ | ||
| 907 | ** New function 'add-variable-watcher' can be used to call a function | 911 | ** New function 'add-variable-watcher' can be used to call a function |
| 908 | when a symbol's value is changed. This is used to implement the new | 912 | when a symbol's value is changed. This is used to implement the new |
| 909 | debugger command 'debug-on-variable-change'. | 913 | debugger command 'debug-on-variable-change'. |