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: Mon, 15 Jul 2019 14:39:49 +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: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="170870"; 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 Mon Jul 15 16:41:15 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 1hn2AD-000iHg-Kw for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 16:41:13 +0200 Original-Received: from localhost ([::1]:39602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn2AC-0006Yy-LB for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 10:41:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37539) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn2A9-0006Yr-JE for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 10:41:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn2A3-0003Zy-QV for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 10:41:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39872) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn2A2-0003ZQ-Aj for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 10:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn2A2-0000wL-0N for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 10:41: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: Mon, 15 Jul 2019 14:41: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.15632016373559 (code B ref 36597); Mon, 15 Jul 2019 14:41:01 +0000 Original-Received: (at 36597) by debbugs.gnu.org; 15 Jul 2019 14:40:37 +0000 Original-Received: from localhost ([127.0.0.1]:48693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn29c-0000vK-LN for submit@debbugs.gnu.org; Mon, 15 Jul 2019 10:40:36 -0400 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:34418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn29Y-0000v3-HD for 36597@debbugs.gnu.org; Mon, 15 Jul 2019 10:40:35 -0400 Original-Received: by mail-oi1-f170.google.com with SMTP id l12so12830321oil.1 for <36597@debbugs.gnu.org>; Mon, 15 Jul 2019 07:40: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=hmzGg/srQlD9m0/WzOYg+2UdDlZrkD64OYN86d/e82I=; b=bC2E3Sb0kn2d9mPF/An9fRrAt6K/NqRCNPTjLiqn5L5ksKik0kywI2fncdkitlo7yF 4ijEkjE86m1WzP+S4QnUfx93Qbo0P/XU6IhXnS6xn1z70TCDLd4upTScpIYh/xRipg7J TMUGZ7olgSAqE0cizxbDYpWFskoRywzgUGCnWvaBuk7QkRiaPJcAIZ84mPVm4Owylrzq KIxtz8sNTv1ogXGkQ0adov3TV3KpCWpvto3fOOI1IdOjcoDxXad21gaTl5O8tr0T9qFW AKG3nnARgtlUULeltuXrGpj3Il8AqySVMFpj6R1XA1UZHTN/lcWKNzyWyvgmLjYvsXu4 FyvA== 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=hmzGg/srQlD9m0/WzOYg+2UdDlZrkD64OYN86d/e82I=; b=l0cAxzVcCNwxIgeYDifPYJb+e+MgEj5ULunmG5bjTUbW41Q+pYI3RBRyrMyTA449BW WpME/dKlLcgq/eUrm3AMSk5Nk4uyifBMbOPRRNAiVB/qX8elZc8sIjYXHiOJMitR31ZW 2pkH/HB3Mrggr4O5BWZsKdimywrbaUvHdTMgdO7njHo0ZLQmkyh/uZ+UfZV9hs/8ES3m p4/A9hyeJ7BzKLpJqq24xwSYU42RyTc7B0Tzui0MTDQ1ZcF/Iz9CKd6ky0i7TZuR9lvM kBhBpVPgklX3jTKm8ybmOLJJSixs06q8qxN4FnoLrVLqjgqs8u6dqaqomM4ws4Gzo6sl m0JA== X-Gm-Message-State: APjAAAXWDG+G7WkIh1y22b/gMZi7dyA3eRTFasqbvwrT/NO8KQgzT6pN +HpB6MRshrud/OSa512YqW9jCaFQk7zRuW4CcbE= X-Google-Smtp-Source: APXvYqzb3dbM5PtC890CVzq5JM0sLtiGVQ57D30WuTP/we1SvH5xHn0g72M5mbg9ZPqSVP3mifDOmEkHcJWibINgC8E= X-Received: by 2002:aca:be88:: with SMTP id o130mr13134250oif.122.1563201626953; Mon, 15 Jul 2019 07:40:26 -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:163121 Archived-At: On Sun, Jul 14, 2019 at 4:54 PM Pip Cet wrote: > > What's a good benchmark for what we should be optimizing for? Ideally something > > somewhat-realistic as opposed to a microbenchmark. Here are the things I've tried so far (building a full histogram of actual clock cycles per run in all cases): 1. ja-dic.el: my patch is slightly faster: (on the order of 0.5%) 2. emacs -Q --batch: my patch is slightly slower (on the order of ~2%) 3. emacs -Q --eval "(run-with-timer 1 nil #'kill-emacs)": my patch is very slightly faster (on the order of 0.1%) Test 3 was run using a dedicated Xvnc server; all tests were run in parallel with and without the patch. The main advantage of my patch appears to be a reduction in pdumper image size, which somehow leads to the performance improvement. I haven't benchmarked a hypothetical patch which reduces the pdumper image size but continues rehashing lazily. 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...