GNU bug report logs - #36597
27.0.50; rehash hash tables eagerly in pdumper

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Pip Cet <pipcet@HIDDEN>; dated Thu, 11 Jul 2019 14:07:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 36597 <at> debbugs.gnu.org:


Received: (at 36597) by debbugs.gnu.org; 14 Jul 2019 15:49:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 14 11:49:26 2019
Received: from localhost ([127.0.0.1]:45670 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hmgkg-0000UL-0T
	for submit <at> debbugs.gnu.org; Sun, 14 Jul 2019 11:49:26 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45200)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1hmgkd-0000U8-W2
 for 36597 <at> debbugs.gnu.org; Sun, 14 Jul 2019 11:49:24 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 49C441626AA;
 Sun, 14 Jul 2019 08:49:17 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id CTtXIxU6SQq7; Sun, 14 Jul 2019 08:49:16 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 96CFF162704;
 Sun, 14 Jul 2019 08:49:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 83WIqIEzsBZi; Sun, 14 Jul 2019 08:49:16 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6C63C1626AA;
 Sun, 14 Jul 2019 08:49:16 -0700 (PDT)
Subject: Re: bug#36597: 27.0.50; rehash hash tables eagerly in pdumper
To: Pip Cet <pipcet@HIDDEN>
References: <CAOqdjBeJ+V7u8P_+aWKYA+=GwTMQsBLTK6YW6YeSAEWj9VRcmw@HIDDEN>
 <6a260307-a463-bd08-8a10-d7664d0606a2@HIDDEN>
 <CAOqdjBcYJd60KQmxe4F_88fr9WZ0ct6M1f1snWxe2N1+kZQx+w@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <74235afc-7043-1da7-7c71-07f0ca23b9fd@HIDDEN>
Date: Sun, 14 Jul 2019 08:49:16 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.7.2
MIME-Version: 1.0
In-Reply-To: <CAOqdjBcYJd60KQmxe4F_88fr9WZ0ct6M1f1snWxe2N1+kZQx+w@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36597
Cc: 36597 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Pip Cet wrote:
> Indeed, that's plenty of small Emacs processes not doing very much.
> It's not the case we ought to be optimizing for, I think, but the
> performance concerns should be taken seriously.

What's a good benchmark for what we should be optimizing for? Ideally something 
somewhat-realistic as opposed to a microbenchmark.

It doesn't appear to be as simple as plenty of processes not doing very much. 
This benchmark:

cd leim && time make -B ../lisp/leim/ja-dic/ja-dic.el

is dominated by a single CPU-intensive Emacs process and takes about 19 CPU 
seconds on my home desktop. The proposed patch slows this benchmark down by 
about 0.6%. (I ran the benchmark ten times after a warmup run, and took the 
average of the ten user+system times.)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36597; Package emacs. Full text available.

Message received at 36597 <at> debbugs.gnu.org:


Received: (at 36597) by debbugs.gnu.org; 14 Jul 2019 15:02:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 14 11:02:31 2019
Received: from localhost ([127.0.0.1]:45641 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hmg1H-0005dj-Cj
	for submit <at> debbugs.gnu.org; Sun, 14 Jul 2019 11:02:31 -0400
Received: from mail-ot1-f50.google.com ([209.85.210.50]:38255)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1hmg1F-0005dV-4A
 for 36597 <at> debbugs.gnu.org; Sun, 14 Jul 2019 11:02:29 -0400
Received: by mail-ot1-f50.google.com with SMTP id d17so14295706oth.5
 for <36597 <at> debbugs.gnu.org>; Sun, 14 Jul 2019 08:02:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=xwvZZUp+X9cAPDy6VfPJHbkV0flv9zfuGkOavhQYpvQ=;
 b=W/V9GErEEmNRXcVZBMGc/Rn/vTBDOO5rPduc8B/vqwDDxzpKXGOPXTUj/kA6x98aUG
 RNzz1HZ+yIy/OMgid3ygrV4CHYJTT3mhnB2fsEDArpbd8Q8oXfbGVjOskdPw61torJJu
 UZGzE9GEGe1WlM6w/PgWEgK1sCbWOzFak+RuY8o2mc1G7A+A0ETXzcWoX4nfKOv6WZ6p
 mPSFygHdfRJO5kJ6n8T2/v6K2Xn1rGAA+ITjykU9G+lvOR/ZSffJ1GvwhcraKngctXEp
 C8A16l27XRPerIeNFKSJdNZYliDsXsLw2kjLXKP1dNEx+TFFuQD/xXmv35axCSMoMYRx
 et+g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=xwvZZUp+X9cAPDy6VfPJHbkV0flv9zfuGkOavhQYpvQ=;
 b=Xve18oSO5AWrsAyLPK8KbznM0vWtPb/sI/6TJQd6ELbXUVXxF1h4dgBE4HkanNMdyG
 tnoWUBjuwU23SsSSENdWp802NFyLJ4J1YYO/AQFPwHvhuYOjaUO9Ck9nH1vgWwFISbJE
 eDhI8TY29ZkzogTbbhg2sd5VELqP8z7cgycioa5q58vVEo5WNYC2ByJHiV4wOGS6lQpN
 0Ob5qP7im/L8V8/HuUf8/cQgIkLnmUVtx80SGqYpDcGLQsXhwxEhR5TJKrV+/bm5CT8N
 /wcMwZGbbMmj6pj3bwPYBsG5R3US2DVckTxF9fWQf+ECKxHrImBuE0o+JhuMp3P6t59s
 fIiQ==
X-Gm-Message-State: APjAAAV35dVJxTfLclEoFxOfgNmH2r+V7Gj2G0fgUbMJibOefMnhw+9P
 g2UgUUqYsm+vslEmHIUrXhvOWrbBisqtf1oDZs8=
X-Google-Smtp-Source: APXvYqzumsUvVdkiXs5/LPHwSeDU56iDQAB6P1q1OEhqTzRVP1UDwjdIkzuyDu49YnToSqbo7wZGokelaFXWh8Otr3c=
X-Received: by 2002:a9d:6014:: with SMTP id h20mr16242774otj.210.1563116543435; 
 Sun, 14 Jul 2019 08:02:23 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBeJ+V7u8P_+aWKYA+=GwTMQsBLTK6YW6YeSAEWj9VRcmw@HIDDEN>
 <6a260307-a463-bd08-8a10-d7664d0606a2@HIDDEN>
In-Reply-To: <6a260307-a463-bd08-8a10-d7664d0606a2@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 14 Jul 2019 15:01:47 +0000
Message-ID: <CAOqdjBcYJd60KQmxe4F_88fr9WZ0ct6M1f1snWxe2N1+kZQx+w@HIDDEN>
Subject: Re: bug#36597: 27.0.50; rehash hash tables eagerly in pdumper
To: Paul Eggert <eggert@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 36597
Cc: 36597 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Sun, Jul 14, 2019 at 2:40 PM Paul Eggert <eggert@HIDDEN> wrote:
> Although I like the simplicity of eager rehashing, I'm not yet sold on the
> performance implications. On my usual (cd lisp && make compile-always)
> benchmark, the patch hurt user+system CPU time performance by 1.5%. Admittedly
> just one benchmark, but still....

Indeed, that's plenty of small Emacs processes not doing very much.
It's not the case we ought to be optimizing for, I think, but the
performance concerns should be taken seriously. One way to avoid the
performance problems entirely is preferred-address loading of hash
dumps, but that has security implications...

> Also, must we expose Vpdumper_hash_tables to Lisp? Surely it'd be better to keep
> it private to pdumper.c.

Oops, I agree absolutely. Will remove that.

> I'll CC: to Daniel to see whether he has any insights about improvements in this
> area.

Sure; I sent the original email to Daniel, too, of course.

> PS. I ran that benchmark on my home desktop, an Intel Xeon E3-1225 v2 running
> Ubunto 18.04.2. To run it, I rebased your patch and also removed the
> no-longer-used PDUMPER_CHECK_REHASHING macro that my GCC complained about
> (wonder why that didn't happen for you?), resulting in the attached patch
> against current master 8ff09154a29a1151afb2902267ca35f89ebda73c.

Some GCC versions complain about it, some don't, I think.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36597; Package emacs. Full text available.

Message received at 36597 <at> debbugs.gnu.org:


Received: (at 36597) by debbugs.gnu.org; 14 Jul 2019 14:39:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 14 10:39:20 2019
Received: from localhost ([127.0.0.1]:45595 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hmfep-0002sQ-Q9
	for submit <at> debbugs.gnu.org; Sun, 14 Jul 2019 10:39:20 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1hmfem-0002sA-WE
 for 36597 <at> debbugs.gnu.org; Sun, 14 Jul 2019 10:39:18 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id B3BD11626AA;
 Sun, 14 Jul 2019 07:39:10 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 1gdu1G9kyYAL; Sun, 14 Jul 2019 07:39:08 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id DB9041626B9;
 Sun, 14 Jul 2019 07:39:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id ClyIYe2rIFMN; Sun, 14 Jul 2019 07:39:08 -0700 (PDT)
Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com
 [23.242.74.103])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A393D1626AA;
 Sun, 14 Jul 2019 07:39:08 -0700 (PDT)
To: Pip Cet <pipcet@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Subject: 27.0.50; rehash hash tables eagerly in pdumper
Organization: UCLA Computer Science Department
Message-ID: <6a260307-a463-bd08-8a10-d7664d0606a2@HIDDEN>
Date: Sun, 14 Jul 2019 07:39:08 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.7.2
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------5F0120606C9BF0661B12A340"
Content-Language: en-US
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36597
Cc: 36597 <at> debbugs.gnu.org, Daniel Colascione <dancol@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

This is a multi-part message in MIME format.
--------------5F0120606C9BF0661B12A340
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Although I like the simplicity of eager rehashing, I'm not yet sold on the 
performance implications. On my usual (cd lisp && make compile-always) 
benchmark, the patch hurt user+system CPU time performance by 1.5%. Admittedly 
just one benchmark, but still....

Also, must we expose Vpdumper_hash_tables to Lisp? Surely it'd be better to keep 
it private to pdumper.c.

I'll CC: to Daniel to see whether he has any insights about improvements in this 
area.

PS. I ran that benchmark on my home desktop, an Intel Xeon E3-1225 v2 running 
Ubunto 18.04.2. To run it, I rebased your patch and also removed the 
no-longer-used PDUMPER_CHECK_REHASHING macro that my GCC complained about 
(wonder why that didn't happen for you?), resulting in the attached patch 
against current master 8ff09154a29a1151afb2902267ca35f89ebda73c.

--------------5F0120606C9BF0661B12A340
Content-Type: text/x-patch;
 name="0001-Rehash-hash-tables-eagerly-after-loading-a-portable-.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-Rehash-hash-tables-eagerly-after-loading-a-portable-.pa";
 filename*1="tch"

From 96a36697b2f472f3a6b3138444659babd0d73f32 Mon Sep 17 00:00:00 2001
From: Pip Cet <pipcet@HIDDEN>
Date: Sun, 14 Jul 2019 07:22:01 -0700
Subject: [PATCH] Rehash hash tables eagerly after loading a portable dump

* src/lisp.h (hash_rehash_needed_p): Remove.  All uses removed.
(hash_rehash_if_needed): Remove.  All uses removed.
(struct Lisp_Hash_Table): Remove comment about rehashing hash tables.
* src/pdumper.c (thaw_hash_tables): New function.
(hash_table_thaw): New function.
(hash_table_freeze): New function.
(dump_hash_table): Simplify.
(dump_hash_table_list): New function.
(hash_table_contents): New function.
(Fdump_emacs_portable): Handle hash tables by eager rehashing.
(pdumper_load): Restore hash tables.
(init_pdumper_once): New function.
(PDUMPER_CHECK_REHASHING): Remove.
---
 src/bytecode.c  |   1 -
 src/composite.c |   1 -
 src/emacs.c     |   1 +
 src/fns.c       |  54 ++++----------
 src/lisp.h      |  19 +----
 src/minibuf.c   |   3 -
 src/pdumper.c   | 188 ++++++++++++++++++++++++------------------------
 src/pdumper.h   |   1 +
 8 files changed, 108 insertions(+), 160 deletions(-)

diff --git a/src/bytecode.c b/src/bytecode.c
index 29dff44f00..9c72429e0c 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -1402,7 +1402,6 @@ #define DEFINE(name, value) LABEL (name) ,
             Lisp_Object v1 = POP;
             ptrdiff_t i;
             struct Lisp_Hash_Table *h = XHASH_TABLE (jmp_table);
-            hash_rehash_if_needed (h);
 
             /* h->count is a faster approximation for HASH_TABLE_SIZE (h)
                here. */
diff --git a/src/composite.c b/src/composite.c
index 183062de46..49a285cff0 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -654,7 +654,6 @@ gstring_lookup_cache (Lisp_Object header)
 composition_gstring_put_cache (Lisp_Object gstring, ptrdiff_t len)
 {
   struct Lisp_Hash_Table *h = XHASH_TABLE (gstring_hash_table);
-  hash_rehash_if_needed (h);
   Lisp_Object header = LGSTRING_HEADER (gstring);
   EMACS_UINT hash = h->test.hashfn (&h->test, header);
   if (len < 0)
diff --git a/src/emacs.c b/src/emacs.c
index ad661a081b..855b2c6715 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1560,6 +1560,7 @@ main (int argc, char **argv)
   if (!initialized)
     {
       init_alloc_once ();
+      init_pdumper_once ();
       init_obarray_once ();
       init_eval_once ();
       init_charset_once ();
diff --git a/src/fns.c b/src/fns.c
index 0497588689..b6134a314c 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4241,43 +4241,24 @@ hash_table_rehash (struct Lisp_Hash_Table *h)
 {
   ptrdiff_t size = HASH_TABLE_SIZE (h);
 
-  /* These structures may have been purecopied and shared
-     (bug#36447).  */
-  h->next = Fcopy_sequence (h->next);
-  h->index = Fcopy_sequence (h->index);
-  h->hash = Fcopy_sequence (h->hash);
-
   /* Recompute the actual hash codes for each entry in the table.
      Order is still invalid.  */
   for (ptrdiff_t i = 0; i < size; ++i)
-    if (!NILP (HASH_HASH (h, i)))
-      {
-        Lisp_Object key = HASH_KEY (h, i);
-        EMACS_UINT hash_code = h->test.hashfn (&h->test, key);
-        set_hash_hash_slot (h, i, make_fixnum (hash_code));
-      }
-
-  /* Reset the index so that any slot we don't fill below is marked
-     invalid.  */
-  Ffillarray (h->index, make_fixnum (-1));
+    {
+      Lisp_Object key = HASH_KEY (h, i);
+      EMACS_UINT hash_code = h->test.hashfn (&h->test, key);
+      set_hash_hash_slot (h, i, make_fixnum (hash_code));
+    }
 
   /* Rebuild the collision chains.  */
   for (ptrdiff_t i = 0; i < size; ++i)
-    if (!NILP (HASH_HASH (h, i)))
-      {
-        EMACS_UINT hash_code = XUFIXNUM (HASH_HASH (h, i));
-        ptrdiff_t start_of_bucket = hash_code % ASIZE (h->index);
-        set_hash_next_slot (h, i, HASH_INDEX (h, start_of_bucket));
-        set_hash_index_slot (h, start_of_bucket, i);
-        eassert (HASH_NEXT (h, i) != i); /* Stop loops.  */
-      }
-
-  /* Finally, mark the hash table as having a valid hash order.
-     Do this last so that if we're interrupted, we retry on next
-     access. */
-  eassert (h->count < 0);
-  h->count = -h->count;
-  eassert (!hash_rehash_needed_p (h));
+    {
+      EMACS_UINT hash_code = XUFIXNUM (HASH_HASH (h, i));
+      ptrdiff_t start_of_bucket = hash_code % ASIZE (h->index);
+      set_hash_next_slot (h, i, HASH_INDEX (h, start_of_bucket));
+      set_hash_index_slot (h, start_of_bucket, i);
+      eassert (HASH_NEXT (h, i) != i); /* Stop loops.  */
+    }
 }
 
 /* Lookup KEY in hash table H.  If HASH is non-null, return in *HASH
@@ -4290,8 +4271,6 @@ hash_lookup (struct Lisp_Hash_Table *h, Lisp_Object key, EMACS_UINT *hash)
   EMACS_UINT hash_code;
   ptrdiff_t start_of_bucket, i;
 
-  hash_rehash_if_needed (h);
-
   hash_code = h->test.hashfn (&h->test, key);
   eassert ((hash_code & ~INTMASK) == 0);
   if (hash)
@@ -4320,8 +4299,6 @@ hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value,
 {
   ptrdiff_t start_of_bucket, i;
 
-  hash_rehash_if_needed (h);
-
   eassert ((hash & ~INTMASK) == 0);
 
   /* Increment count after resizing because resizing may fail.  */
@@ -4355,8 +4332,6 @@ hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key)
   ptrdiff_t start_of_bucket = hash_code % ASIZE (h->index);
   ptrdiff_t prev = -1;
 
-  hash_rehash_if_needed (h);
-
   for (ptrdiff_t i = HASH_INDEX (h, start_of_bucket);
        0 <= i;
        i = HASH_NEXT (h, i))
@@ -4434,9 +4409,7 @@ sweep_weak_table (struct Lisp_Hash_Table *h, bool remove_entries_p)
   for (ptrdiff_t bucket = 0; bucket < n; ++bucket)
     {
       /* Follow collision chain, removing entries that don't survive
-         this garbage collection.  It's okay if hash_rehash_needed_p
-         (h) is true, since we're operating entirely on the cached
-         hash values. */
+         this garbage collection.  */
       ptrdiff_t prev = -1;
       ptrdiff_t next;
       for (ptrdiff_t i = HASH_INDEX (h, bucket); 0 <= i; i = next)
@@ -4881,7 +4854,6 @@ DEFUN ("hash-table-count", Fhash_table_count, Shash_table_count, 1, 1, 0,
   (Lisp_Object table)
 {
   struct Lisp_Hash_Table *h = check_hash_table (table);
-  hash_rehash_if_needed (h);
   return make_fixnum (h->count);
 }
 
diff --git a/src/lisp.h b/src/lisp.h
index 13014c82dc..d0e5c43c41 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2245,11 +2245,7 @@ #define DEFSYM(sym, name) /* empty */
 
 struct Lisp_Hash_Table
 {
-  /* Change pdumper.c if you change the fields here.
-
-     IMPORTANT!!!!!!!
-
-     Call hash_rehash_if_needed() before accessing.  */
+  /* Change pdumper.c if you change the fields here.  */
 
   /* This is for Lisp; the hash table code does not refer to it.  */
   union vectorlike_header header;
@@ -2363,19 +2359,6 @@ HASH_TABLE_SIZE (const struct Lisp_Hash_Table *h)
 
 void hash_table_rehash (struct Lisp_Hash_Table *h);
 
-INLINE bool
-hash_rehash_needed_p (const struct Lisp_Hash_Table *h)
-{
-  return h->count < 0;
-}
-
-INLINE void
-hash_rehash_if_needed (struct Lisp_Hash_Table *h)
-{
-  if (hash_rehash_needed_p (h))
-    hash_table_rehash (h);
-}
-
 /* Default size for hash tables if not specified.  */
 
 enum DEFAULT_HASH_SIZE { DEFAULT_HASH_SIZE = 65 };
diff --git a/src/minibuf.c b/src/minibuf.c
index d9a6e15b05..e923ce2a43 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1203,9 +1203,6 @@ DEFUN ("try-completion", Ftry_completion, Stry_completion, 2, 3, 0,
       bucket = AREF (collection, idx);
     }
 
-  if (HASH_TABLE_P (collection))
-    hash_rehash_if_needed (XHASH_TABLE (collection));
-
   while (1)
     {
       /* Get the next element of the alist, obarray, or hash-table.  */
diff --git a/src/pdumper.c b/src/pdumper.c
index 03c00bf27b..d35d296d32 100644
--- a/src/pdumper.c
+++ b/src/pdumper.c
@@ -107,17 +107,6 @@ #define VM_MS_WINDOWS 2
 
 #define DANGEROUS 0
 
-/* PDUMPER_CHECK_REHASHING being true causes the portable dumper to
-   check, for each hash table it dumps, that the hash table means the
-   same thing after rehashing.  */
-#ifndef PDUMPER_CHECK_REHASHING
-# if ENABLE_CHECKING
-#  define PDUMPER_CHECK_REHASHING 1
-# else
-#  define PDUMPER_CHECK_REHASHING 0
-# endif
-#endif
-
 /* We require an architecture in which all pointers are the same size
    and have the same layout, where pointers are either 32 or 64 bits
    long, and where bytes have eight bits --- that is, a
@@ -393,6 +382,8 @@ dump_fingerprint (char const *label,
      The start of the cold region is always aligned on a page
      boundary.  */
   dump_off cold_start;
+
+  dump_off hash_list;
 };
 
 /* Double-ended singly linked list.  */
@@ -550,6 +541,8 @@ dump_fingerprint (char const *label,
      heap objects.  */
   Lisp_Object bignum_data;
 
+  Lisp_Object hash_tables;
+
   unsigned number_hot_relocations;
   unsigned number_discardable_relocations;
 };
@@ -2622,68 +2615,64 @@ dump_vectorlike_generic (struct dump_context *ctx,
   return offset;
 }
 
-/* Determine whether the hash table's hash order is stable
-   across dump and load.  If it is, we don't have to trigger
-   a rehash on access.  */
-static bool
-dump_hash_table_stable_p (const struct Lisp_Hash_Table *hash)
+/* Return a list of (KEY . VALUE) pairs in the given hash table.  */
+static Lisp_Object
+hash_table_contents (struct Lisp_Hash_Table *h)
 {
-  bool is_eql = hash->test.hashfn == hashfn_eql;
-  bool is_equal = hash->test.hashfn == hashfn_equal;
-  ptrdiff_t size = HASH_TABLE_SIZE (hash);
-  for (ptrdiff_t i = 0; i < size; ++i)
-    if (!NILP (HASH_HASH (hash, i)))
+  Lisp_Object contents = Qnil;
+  /* Make sure key_and_value ends up in the same order, charset.c
+     relies on it by expecting hash table indices to stay constant
+     across the dump.  */
+  for (ptrdiff_t i = HASH_TABLE_SIZE (h) - 1; i >= 0; --i)
+    if (!NILP (HASH_HASH (h, i)))
       {
-        Lisp_Object key =  HASH_KEY (hash, i);
-	bool key_stable = (dump_builtin_symbol_p (key)
-			   || FIXNUMP (key)
-			   || (is_equal && STRINGP (key))
-			   || ((is_equal || is_eql) && FLOATP (key)));
-        if (!key_stable)
-          return false;
+	dump_push (&contents, HASH_VALUE (h, i));
+	dump_push (&contents, HASH_KEY (h, i));
       }
+  return CALLN (Fapply, Qvector, contents);
+}
 
-  return true;
+static dump_off
+dump_hash_table_list (struct dump_context *ctx)
+{
+  if (CONSP (ctx->hash_tables))
+    return dump_object (ctx, CALLN (Fapply, Qvector, ctx->hash_tables));
+  else
+    return 0;
 }
 
-/* Return a list of (KEY . VALUE) pairs in the given hash table.  */
-static Lisp_Object
-hash_table_contents (Lisp_Object table)
+static void
+hash_table_freeze (struct Lisp_Hash_Table *h)
 {
-  Lisp_Object contents = Qnil;
-  struct Lisp_Hash_Table *h = XHASH_TABLE (table);
-  for (ptrdiff_t i = 0; i < HASH_TABLE_SIZE (h); ++i)
-    if (!NILP (HASH_HASH (h, i)))
-      dump_push (&contents, Fcons (HASH_KEY (h, i), HASH_VALUE (h, i)));
-  return Fnreverse (contents);
+  h->key_and_value = hash_table_contents (h);
+  ptrdiff_t nkeys = XFIXNAT (Flength (h->key_and_value)) / 2;
+  h->count = nkeys;
+  if (nkeys == 0)
+    nkeys = 1;
+  h->index = h->next = h->hash = make_fixnum (nkeys);
 }
 
-/* Copy the given hash table, rehash it, and make sure that we can
-   look up all the values in the original.  */
 static void
-check_hash_table_rehash (Lisp_Object table_orig)
-{
-  hash_rehash_if_needed (XHASH_TABLE (table_orig));
-  Lisp_Object table_rehashed = Fcopy_hash_table (table_orig);
-  eassert (XHASH_TABLE (table_rehashed)->count >= 0);
-  XHASH_TABLE (table_rehashed)->count *= -1;
-  eassert (XHASH_TABLE (table_rehashed)->count <= 0);
-  hash_rehash_if_needed (XHASH_TABLE (table_rehashed));
-  eassert (XHASH_TABLE (table_rehashed)->count >= 0);
-  Lisp_Object expected_contents = hash_table_contents (table_orig);
-  while (!NILP (expected_contents))
+hash_table_thaw (struct Lisp_Hash_Table *h)
+{
+  Lisp_Object count = h->index;
+  h->index = Fmake_vector (h->index, make_fixnum (-1));
+  h->hash = Fmake_vector (h->hash, Qnil);
+  h->next = Fmake_vector (h->next, make_fixnum (-1));
+  Lisp_Object key_and_value = h->key_and_value;
+  h->next_free = -1;
+  if (XFIXNAT (count) <= 1)
     {
-      Lisp_Object key_value_pair = dump_pop (&expected_contents);
-      Lisp_Object key = XCAR (key_value_pair);
-      Lisp_Object expected_value = XCDR (key_value_pair);
-      Lisp_Object arbitrary = Qdump_emacs_portable__sort_predicate_copied;
-      Lisp_Object found_value = Fgethash (key, table_rehashed, arbitrary);
-      eassert (EQ (expected_value, found_value));
-      Fremhash (key, table_rehashed);
+      h->key_and_value = Fmake_vector (make_fixnum (2 * XFIXNAT (count)), Qnil);
+      ptrdiff_t i = 0;
+      while (i < ASIZE (key_and_value))
+	{
+	  ASET (h->key_and_value, i, AREF (key_and_value, i));
+	  i++;
+	}
     }
 
-  eassert (EQ (Fhash_table_count (table_rehashed),
-               make_fixnum (0)));
+  hash_table_rehash (h);
 }
 
 static dump_off
@@ -2695,45 +2684,11 @@ dump_hash_table (struct dump_context *ctx,
 # error "Lisp_Hash_Table changed. See CHECK_STRUCTS comment in config.h."
 #endif
   const struct Lisp_Hash_Table *hash_in = XHASH_TABLE (object);
-  bool is_stable = dump_hash_table_stable_p (hash_in);
-  /* If the hash table is likely to be modified in memory (either
-     because we need to rehash, and thus toggle hash->count, or
-     because we need to assemble a list of weak tables) punt the hash
-     table to the end of the dump, where we can lump all such hash
-     tables together.  */
-  if (!(is_stable || !NILP (hash_in->weak))
-      && ctx->flags.defer_hash_tables)
-    {
-      if (offset != DUMP_OBJECT_ON_HASH_TABLE_QUEUE)
-        {
-	  eassert (offset == DUMP_OBJECT_ON_NORMAL_QUEUE
-		   || offset == DUMP_OBJECT_NOT_SEEN);
-          /* We still want to dump the actual keys and values now.  */
-          dump_enqueue_object (ctx, hash_in->key_and_value, WEIGHT_NONE);
-          /* We'll get to the rest later.  */
-          offset = DUMP_OBJECT_ON_HASH_TABLE_QUEUE;
-          dump_remember_object (ctx, object, offset);
-          dump_push (&ctx->deferred_hash_tables, object);
-        }
-      return offset;
-    }
-
-  if (PDUMPER_CHECK_REHASHING)
-    check_hash_table_rehash (make_lisp_ptr ((void *) hash_in, Lisp_Vectorlike));
-
   struct Lisp_Hash_Table hash_munged = *hash_in;
   struct Lisp_Hash_Table *hash = &hash_munged;
 
-  /* Remember to rehash this hash table on first access.  After a
-     dump reload, the hash table values will have changed, so we'll
-     need to rebuild the index.
-
-     TODO: for EQ and EQL hash tables, it should be possible to rehash
-     here using the preferred load address of the dump, eliminating
-     the need to rehash-on-access if we can load the dump where we
-     want.  */
-  if (hash->count > 0 && !is_stable)
-    hash->count = -hash->count;
+  hash_table_freeze (hash);
+  dump_push (&ctx->hash_tables, object);
 
   START_DUMP_PVEC (ctx, &hash->header, struct Lisp_Hash_Table, out);
   dump_pseudovector_lisp_fields (ctx, &out->header, &hash->header);
@@ -4140,6 +4095,19 @@ DEFUN ("dump-emacs-portable",
 	 || !NILP (ctx->deferred_hash_tables)
 	 || !NILP (ctx->deferred_symbols));
 
+  ctx->header.hash_list = ctx->offset;
+  dump_hash_table_list (ctx);
+
+  do
+    {
+      dump_drain_deferred_hash_tables (ctx);
+      dump_drain_deferred_symbols (ctx);
+      dump_drain_normal_queue (ctx);
+    }
+  while (!dump_queue_empty_p (&ctx->dump_queue)
+	 || !NILP (ctx->deferred_hash_tables)
+	 || !NILP (ctx->deferred_symbols));
+
   dump_sort_copied_objects (ctx);
 
   /* While we copy built-in symbols into the Emacs image, these
@@ -5431,6 +5399,13 @@ pdumper_load (const char *dump_filename)
   for (int i = 0; i < ARRAYELTS (sections); ++i)
     dump_mmap_reset (&sections[i]);
 
+  if (header->hash_list)
+    {
+      struct Lisp_Vector *hash_tables =
+	((struct Lisp_Vector *)(dump_base + header->hash_list));
+      XSETVECTOR (Vpdumper_hash_tables, hash_tables);
+    }
+
   /* Run the functions Emacs registered for doing post-dump-load
      initialization.  */
   for (int i = 0; i < nr_dump_hooks; ++i)
@@ -5502,10 +5477,31 @@ DEFUN ("pdumper-stats", Fpdumper_stats, Spdumper_stats, 0, 0, 0,
 
 
 
+static void thaw_hash_tables (void)
+{
+  Lisp_Object hash_tables = Vpdumper_hash_tables;
+  ptrdiff_t i = 0;
+  while (i < ASIZE (hash_tables))
+    {
+      hash_table_thaw (XHASH_TABLE (AREF (hash_tables, i)));
+      i++;
+    }
+  Vpdumper_hash_tables = zero_vector;
+}
+
+void
+init_pdumper_once (void)
+{
+  Vpdumper_hash_tables = zero_vector;
+  pdumper_do_now_and_after_load (thaw_hash_tables);
+}
+
 void
 syms_of_pdumper (void)
 {
 #ifdef HAVE_PDUMPER
+  DEFVAR_LISP ("pdumper-hash-tables", Vpdumper_hash_tables,
+	       doc: /* A list of hash tables that need to be thawed after loading the pdump.  */);
   defsubr (&Sdump_emacs_portable);
   defsubr (&Sdump_emacs_portable__sort_predicate);
   defsubr (&Sdump_emacs_portable__sort_predicate_copied);
diff --git a/src/pdumper.h b/src/pdumper.h
index ab2f426c1e..cfea06d33d 100644
--- a/src/pdumper.h
+++ b/src/pdumper.h
@@ -248,6 +248,7 @@ pdumper_clear_marks (void)
    file was loaded.  */
 extern void pdumper_record_wd (const char *);
 
+void init_pdumper_once (void);
 void syms_of_pdumper (void);
 
 INLINE_HEADER_END
-- 
2.17.1


--------------5F0120606C9BF0661B12A340--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36597; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Jul 2019 14:06:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 11 10:06:01 2019
Received: from localhost ([127.0.0.1]:38271 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hlZhx-0001js-0P
	for submit <at> debbugs.gnu.org; Thu, 11 Jul 2019 10:06:01 -0400
Received: from lists.gnu.org ([209.51.188.17]:37603)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1hlZht-0001jk-TD
 for submit <at> debbugs.gnu.org; Thu, 11 Jul 2019 10:05:59 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:55104)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <pipcet@HIDDEN>) id 1hlZhr-000845-Ge
 for bug-gnu-emacs@HIDDEN; Thu, 11 Jul 2019 10:05:57 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pipcet@HIDDEN>) id 1hlZho-0008P0-12
 for bug-gnu-emacs@HIDDEN; Thu, 11 Jul 2019 10:05:54 -0400
Received: from mail-ot1-x32c.google.com ([2607:f8b0:4864:20::32c]:42000)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <pipcet@HIDDEN>) id 1hlZhn-0008Nx-GG
 for bug-gnu-emacs@HIDDEN; Thu, 11 Jul 2019 10:05:51 -0400
Received: by mail-ot1-x32c.google.com with SMTP id l15so5950108otn.9
 for <bug-gnu-emacs@HIDDEN>; Thu, 11 Jul 2019 07:05:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=ovEVak1eBLBW1iSQJzbXdan5pWh0QbGswETkc8KiVEc=;
 b=aBsx35gDTvUnIPODhoRlAc8d9JCfqzXML2E3xZ12709Xb6bjt7Pht2ozZRvW5ggFLz
 AtrUIfKA6w9/XIOLW/BbeNUZiewMfKeXgAAxSe72pN4nBPoL6k1gQlffN+2GCOf7j08Y
 z7f0pA7HN2y8RLOPnWOmhUKHbt51/4qO7Ta/vBIYbw55t3ab9mq9pwc6DUtI2EKHE1S2
 Q69Wd7VV3EGqeqkuPNwOZcYkERhM7WP9tiMXIMUhfzCjM2rKAsQbABHYrL5AT5i208NM
 vbXfu2OSQ++NVKndafXUHdjqm5c/M8f3OPVQiwXOChotlmsb3Z/QBUEXDXQLl+qOyqRP
 FoVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=ovEVak1eBLBW1iSQJzbXdan5pWh0QbGswETkc8KiVEc=;
 b=EycjjDTY2Prz2iQ596Z2wKLIZ4YpundLUHMJiE4KzozKbqVIFTKq+f11rVp6wM8FLm
 SjAkr7ipbHkr5F5O4lon+hsPGY4Cu1ScXe8UG3iYwU8C7z65Bg3FWUNKzx0/aT1zp+Us
 qyP/eiIp2XmKo12aladRm2hNgFVVCLJ3UXe+QiS1i9FdDeEbwcTsl38Gobb5dPq8/aNq
 5paUchybZs5oGD5mNd3zRLFIfpAbpM57L3AmFRawXUn6d1FfDfjGQ6BKpg2cTIpr18sE
 HaHRMTsh4yeEauDMMey2edgbdtYpV+2dVHJ+Px/XDTbW/8F/TvD+Av19IEAAQncnjvZh
 nElw==
X-Gm-Message-State: APjAAAV9VlXzf6Ksbhvd/jwyZ/kuw8nmP6K3WeJEofdZGBn9IHxdO7Jz
 gzZiY6SeVLLG2T02bpvZTCRCoHUUAedO9hP76ML9v2Mg
X-Google-Smtp-Source: APXvYqxLASWlFOY3gGBFPIEnUl8xm4NZW0VhH0xA9ZbAHFhVv2b3HOCnRxEVzD8b+Nm9Vf1YMgR98CYVWs9BVSxkyAc=
X-Received: by 2002:a9d:7284:: with SMTP id t4mr3804844otj.154.1562853950384; 
 Thu, 11 Jul 2019 07:05:50 -0700 (PDT)
MIME-Version: 1.0
From: Pip Cet <pipcet@HIDDEN>
Date: Thu, 11 Jul 2019 14:05:14 +0000
Message-ID: <CAOqdjBeJ+V7u8P_+aWKYA+=GwTMQsBLTK6YW6YeSAEWj9VRcmw@HIDDEN>
Subject: 27.0.50; rehash hash tables eagerly in pdumper
To: bug-gnu-emacs@HIDDEN, Daniel Colascione <dancol@HIDDEN>
Content-Type: multipart/mixed; boundary="0000000000008cb6d5058d684ade"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::32c
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--0000000000008cb6d5058d684ade
Content-Type: text/plain; charset="UTF-8"

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.)

--0000000000008cb6d5058d684ade
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-Rehash-hash-tables-eagerly-after-loading-a-portable-.patch"
Content-Disposition: attachment; 
	filename="0001-Rehash-hash-tables-eagerly-after-loading-a-portable-.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_jxyqt0420>
X-Attachment-Id: f_jxyqt0420

RnJvbSAyZGIzOTY0ZjJkODI5MGI5MDViMmQyMGUyYTYyZmIwNzNmZWMxMzgyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBUaHUs
IDExIEp1bCAyMDE5IDEyOjA2OjU5ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gUmVoYXNoIGhhc2gg
dGFibGVzIGVhZ2VybHkgYWZ0ZXIgbG9hZGluZyBhIHBvcnRhYmxlIGR1bXAKCiogc3JjL2xpc3Au
aCAoaGFzaF9yZWhhc2hfbmVlZGVkX3ApOiBSZW1vdmUuICBBbGwgdXNlcyByZW1vdmVkLgooaGFz
aF9yZWhhc2hfaWZfbmVlZGVkKTogUmVtb3ZlLiAgQWxsIHVzZXMgcmVtb3ZlZC4KKHN0cnVjdCBM
aXNwX0hhc2hfVGFibGUpOiBSZW1vdmUgY29tbWVudCBhYm91dCByZWhhc2hpbmcgaGFzaCB0YWJs
ZXMuCiogc3JjL3BkdW1wZXIuYyAodGhhd19oYXNoX3RhYmxlcyk6IE5ldyBmdW5jdGlvbi4KKGhh
c2hfdGFibGVfdGhhdyk6IE5ldyBmdW5jdGlvbi4KKGhhc2hfdGFibGVfZnJlZXplKTogTmV3IGZ1
bmN0aW9uLgooZH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5ECi0tIAoyLjIwLjEKCg==
--0000000000008cb6d5058d684ade--




Acknowledgement sent to Pip Cet <pipcet@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#36597; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 14 Jul 2019 16:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.