* Re: [Emacs-diffs] master c8d14cf: Fix glitches in recent hash table changes
[not found] ` <20170219202557.EB4A4232F3@vcs0.savannah.gnu.org>
@ 2017-02-19 20:29 ` Stefan Monnier
2017-02-21 23:39 ` Paul Eggert
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2017-02-19 20:29 UTC (permalink / raw)
To: emacs-devel; +Cc: Paul Eggert
> (struct Lisp_Hash_Table.rehash_threshold): Now double rather than
> float, since the float caused unwanted rounding errors, e.g.,
> (hash-table-rehash-threshold (make-hash-table)) yielded
> 0.800000011920929 instead of the correct 0.8.
I very consciously decided that those rounding errors do not matter.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Emacs-diffs] master c8d14cf: Fix glitches in recent hash table changes
2017-02-19 20:29 ` [Emacs-diffs] master c8d14cf: Fix glitches in recent hash table changes Stefan Monnier
@ 2017-02-21 23:39 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2017-02-21 23:39 UTC (permalink / raw)
To: Stefan Monnier, emacs-devel
On 02/19/2017 12:29 PM, Stefan Monnier wrote:
> I very consciously decided that those rounding errors do not matter.
Yes, the exact values of hash-table size parameters do not matter.
Still, it's surprising to see that seemingly-spurious change from 0.8 to
0.800000011920929. I fixed this by changing the default to 0.8125, which
does not suffer rounding error.
Also, we can tweak rehash_size and next_hash similarly. I installed a
set of patches to do that. On my x86-64 Fedora 25 platform the patches
save 8 bytes per hash table and a few hundred bytes in executable code.
No big deal, but the code seems a bit simpler this way.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-21 23:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20170219202556.9696.39615@vcs0.savannah.gnu.org>
[not found] ` <20170219202557.EB4A4232F3@vcs0.savannah.gnu.org>
2017-02-19 20:29 ` [Emacs-diffs] master c8d14cf: Fix glitches in recent hash table changes Stefan Monnier
2017-02-21 23:39 ` Paul Eggert
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).