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 /doc | |
| 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 'doc')
| -rw-r--r-- | doc/lispref/hash.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/objects.texi | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi index 725d19c3bdc..4ba3258d189 100644 --- a/doc/lispref/hash.texi +++ b/doc/lispref/hash.texi | |||
| @@ -144,8 +144,9 @@ The default value is 1.5. | |||
| 144 | This specifies the criterion for when the hash table is full (so | 144 | This specifies the criterion for when the hash table is full (so |
| 145 | it should be made larger). The value, @var{threshold}, should be a | 145 | it should be made larger). The value, @var{threshold}, should be a |
| 146 | positive floating-point number, no greater than 1. The hash table is | 146 | positive floating-point number, no greater than 1. The hash table is |
| 147 | full whenever the actual number of entries exceeds this fraction | 147 | full whenever the actual number of entries exceeds the nominal size |
| 148 | of the nominal size. The default for @var{threshold} is 0.8. | 148 | multiplied by an approximation to this value. The default for |
| 149 | @var{threshold} is 0.8125. | ||
| 149 | @end table | 150 | @end table |
| 150 | @end defun | 151 | @end defun |
| 151 | 152 | ||
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index fbb66582f29..56049af60a1 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi | |||
| @@ -1251,7 +1251,7 @@ and contents, like this: | |||
| 1251 | @example | 1251 | @example |
| 1252 | (make-hash-table) | 1252 | (make-hash-table) |
| 1253 | @result{} #s(hash-table size 65 test eql rehash-size 1.5 | 1253 | @result{} #s(hash-table size 65 test eql rehash-size 1.5 |
| 1254 | rehash-threshold 0.8 data ()) | 1254 | rehash-threshold 0.8125 data ()) |
| 1255 | @end example | 1255 | @end example |
| 1256 | 1256 | ||
| 1257 | @noindent | 1257 | @noindent |