[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36597: 27.0.50; rehash hash tables eagerly in pdumper
From: |
Pip Cet |
Subject: |
bug#36597: 27.0.50; rehash hash tables eagerly in pdumper |
Date: |
Thu, 11 Jul 2019 14:05:14 +0000 |
This is a follow-up to bug#36447, which has been fixed.
Lazy rehashing for hash tables should be removed. This patch does that.
Lazy rehashing makes all code that accesses hash tables a little more
complicated; in at least one case, we forgot to do that, resulting in
bug#36596.
The sole benefit of lazy rehashing to be mentioned so far is that
start-up time is reduced a little (by less than a millisecond on this
system), and that for certain usage patterns (many short Emacs
sessions that don't do very much, I think), this might outweigh the
negative consequences of lazy rehashing.
Lazy rehashing means less maintainable code, more code, and, at
run-time, slightly slower code.
In particular, it means that we have to have a comment in lisp.h which
distracts from the code and has to be marked as "IMPORTANT!!!!!!!",
which I think is nearly as annoying as having to jump through special
hoops before accessing a hash table.
I'm posting this as a separate bug so we can have a, hopefully, brief
discussion about it and then either move away from lazy rehashing or
continue using it; if we decide to continue using it, it should be
documented in much more detail.
(We should keep in mind that conditional branches, even ones that are
well-predicted and don't cause cache misses, aren't free: they use
execution units, and preparing their arguments in registers increases
register pressure, and of course they increase code size.)
0001-Rehash-hash-tables-eagerly-after-loading-a-portable-.patch
Description: Text Data
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper,
Pip Cet <=
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Paul Eggert, 2019/07/14
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Pip Cet, 2019/07/14
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Paul Eggert, 2019/07/14
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Pip Cet, 2019/07/14
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Pip Cet, 2019/07/15
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Pip Cet, 2019/07/19
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Eli Zaretskii, 2019/07/19
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Pip Cet, 2019/07/20
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Paul Eggert, 2019/07/20
- bug#36597: 27.0.50; rehash hash tables eagerly in pdumper, Pip Cet, 2019/07/21