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: Sun, 14 Jul 2019 15:01:47 +0000 Message-ID: References: <6a260307-a463-bd08-8a10-d7664d0606a2@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="134893"; 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 Sun Jul 14 17:06:08 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 1hmg4j-000Yj4-2n for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 17:06:05 +0200 Original-Received: from localhost ([::1]:32768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmg1t-0006rp-NR for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 11:03:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57714) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmg1q-0006rM-Ip for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 11:03:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmg1p-0002Q7-H5 for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 11:03:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36827) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmg1m-0002Oj-Nz for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 11:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmg1m-0005fA-JX for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 11:03: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: Sun, 14 Jul 2019 15:03:02 +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.156311655121687 (code B ref 36597); Sun, 14 Jul 2019 15:03:02 +0000 Original-Received: (at 36597) by debbugs.gnu.org; 14 Jul 2019 15:02:31 +0000 Original-Received: from localhost ([127.0.0.1]:45641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmg1H-0005dj-Cj for submit@debbugs.gnu.org; Sun, 14 Jul 2019 11:02:31 -0400 Original-Received: from mail-ot1-f50.google.com ([209.85.210.50]:38255) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmg1F-0005dV-4A for 36597@debbugs.gnu.org; Sun, 14 Jul 2019 11:02:29 -0400 Original-Received: by mail-ot1-f50.google.com with SMTP id d17so14295706oth.5 for <36597@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) In-Reply-To: <6a260307-a463-bd08-8a10-d7664d0606a2@cs.ucla.edu> 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:162993 Archived-At: On Sun, Jul 14, 2019 at 2:40 PM Paul Eggert 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.