From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#36597: 27.0.50; rehash hash tables eagerly in pdumper Date: Fri, 19 Jul 2019 07:23:50 +0000 Message-ID: References: <6a260307-a463-bd08-8a10-d7664d0606a2@cs.ucla.edu> <74235afc-7043-1da7-7c71-07f0ca23b9fd@cs.ucla.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="000000000000cd2240058e039dc6" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="223846"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36597@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 19 09:25:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hoNGQ-000w7i-J2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jul 2019 09:25:10 +0200 Original-Received: from localhost ([::1]:42766 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoNGP-0006qS-Ko for geb-bug-gnu-emacs@m.gmane.org; Fri, 19 Jul 2019 03:25:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60688) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hoNGL-0006qC-2h for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:25:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hoNGI-0007qO-F9 for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:25:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hoNGI-0007q8-5r for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hoNGH-0001Tq-VL for bug-gnu-emacs@gnu.org; Fri, 19 Jul 2019 03:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 19 Jul 2019 07:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36597 X-GNU-PR-Package: emacs Original-Received: via spool by 36597-submit@debbugs.gnu.org id=B36597.15635210765656 (code B ref 36597); Fri, 19 Jul 2019 07:25:01 +0000 Original-Received: (at 36597) by debbugs.gnu.org; 19 Jul 2019 07:24:36 +0000 Original-Received: from localhost ([127.0.0.1]:55049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoNFr-0001T9-58 for submit@debbugs.gnu.org; Fri, 19 Jul 2019 03:24:35 -0400 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:38590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hoNFo-0001Sw-PA for 36597@debbugs.gnu.org; Fri, 19 Jul 2019 03:24:33 -0400 Original-Received: by mail-oi1-f170.google.com with SMTP id v186so23559109oie.5 for <36597@debbugs.gnu.org>; Fri, 19 Jul 2019 00:24:32 -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=hFplcDCuhvI8eQZhWlWsttkPJU9IDkmxJPJixjF7u98=; b=Ra92w8JpPbsErQO6Da/jCsBMCYNfvk18QZ3cmOKboXhcBmGr+GfN6h+UecWdM6fPC+ nMlpAsC02XegSEiqWzF65vG38XiXFPJmZwBOPn5kEAaYV08G2bbS42fh5vEd5/e8Hkla pax3Ydi8L07Hm+1elEGO4N4LjrLXQhjWugVPl/W+JeIFESwvTXdp1z3l+lPTC1aIv1D1 P63lqDdv9u67fNZ7fJlmFX69kflN3qrW4dQ6vhg7gOSS/OXNU7tmV1YKfY3Ge8l+VL8d mLBjHi6bSP5QtfXZqNVBRzxP6lkmK0n7KmwIF5Jz7QjFGDBR8UICI3f97Q9aw6RS5a+A nhZg== 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=hFplcDCuhvI8eQZhWlWsttkPJU9IDkmxJPJixjF7u98=; b=fCtB+yodaGkek2KNOk1D7K+RJotwAK1fCQlRny4GTfmaZGBpEXNr7MNTkcnkEo0NYU Ez01UvUPBCBYIFlcujaTO+NdpXtPIpqpKN588u0mDbRtTipvbyURO+uG49HxU/y+D9Nd 7+WptV7iKPuOtwL3DjSAM1oAhILgJbuF6IIau5Bw30ZxFl77B2DQeOR8wvwdQEIz0hwq 2CpFQa0IKhcO2Sh5w7LcL2jmKTDEmRrItWiHTUNfhl1mpsN76dddFtcN9UrsSaIW1cT1 iVA4hoOB0AQGcumG0MbYgT9gAlr1u7n46GstEM+Lghw3IOw1INJ/NTsWwX4CSB1Ka/sp MlNA== X-Gm-Message-State: APjAAAUW2wsnAdyQ6GoT/sCPCDt46nZ1MvEL8oP6fCBcK7dQSKC5CWZB jvClBU7s/nFOM+pq/e4VRTQCwYQYDuZk5eB61tmw+A== X-Google-Smtp-Source: APXvYqyUZjIjew0UjsbCtSYVo8wY6+9/rE3hv4bBNwhoTokE+934GLII0ZJA9UkOsvuus8DI4TRtQH2W+PTscRsA+2I= X-Received: by 2002:aca:be88:: with SMTP id o130mr25028659oif.122.1563521067055; Fri, 19 Jul 2019 00:24:27 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163368 Archived-At: --000000000000cd2240058e039dc6 Content-Type: text/plain; charset="UTF-8" On Mon, Jul 15, 2019 at 2:39 PM Pip Cet wrote: > But I noticed that my patch may affect hashes more than it should, > because it makes the thawed hash have the same size as the number of > hash entries in it. That seems not to hurt performance... But it should be fixed, anyway. The attached patch has no unexpected performance benefits, as far as I can tell. --000000000000cd2240058e039dc6 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Rehash-hash-tables-eagerly-after-loading-a-dump.patch" Content-Disposition: attachment; filename="0001-Rehash-hash-tables-eagerly-after-loading-a-dump.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jy9rq33t0 RnJvbSAyMWVmNWRlZDM3NDE0Mjk4MzdlOTAzZWI5YWRlODhkNTkzYmMwZDhmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBGcmks IDE5IEp1bCAyMDE5IDA3OjEyOjQyICswMDAwClN1YmplY3Q6IFtQQVRDSF0gUmVoYXNoIGhhc2gg dGFibGVzIGVhZ2VybHkgYWZ0ZXIgbG9hZGluZyBhIGR1bXAuCgoqIHNyYy9saXNwLmggKGhhc2hf cmVoYXNoX25lZWRlZF9wKTogUmVtb3ZlLiAgQWxsIHVzZXMgcmVtb3ZlZC4KKGhhc2hfcmVoYXNo X2lmX25lZWRlZCk6IFJlb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