From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#61489: [PATCH 1/1] Increase BLOCK_ALIGN from =?UTF-8?Q?2=C2=B9=E2=81=B0to_?= =?UTF-8?Q?2=C2=B9=E2=81=B5?= Date: Mon, 13 Feb 2023 23:00:06 +0300 Message-ID: <20230213200006.663502-2-Hi-Angel@yandex.ru> References: <20230213200006.663502-1-Hi-Angel@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40803"; mail-complaints-to="usenet@ciao.gmane.io" To: 61489@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 13 21:01:21 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pRf0q-000AUw-0e for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 13 Feb 2023 21:01:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRf0a-00032e-UD; Mon, 13 Feb 2023 15:01:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRf0Y-00030L-Ln for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:01:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pRf0Y-0005La-CF for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pRf0Y-0005vS-7W for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:01:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Feb 2023 20:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61489 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.167631844622733 (code B ref -1); Mon, 13 Feb 2023 20:01:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 13 Feb 2023 20:00:46 +0000 Original-Received: from localhost ([127.0.0.1]:51697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRf0I-0005ua-7O for submit@debbugs.gnu.org; Mon, 13 Feb 2023 15:00:46 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:39194) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pRf0G-0005uS-SK for submit@debbugs.gnu.org; Mon, 13 Feb 2023 15:00:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRf05-0002mn-DP for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:00:35 -0500 Original-Received: from forward501b.mail.yandex.net ([178.154.239.145]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRf02-0005H8-Hu for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2023 15:00:33 -0500 Original-Received: from myt5-69594d4a41fa.qloud-c.yandex.net (myt5-69594d4a41fa.qloud-c.yandex.net [IPv6:2a02:6b8:c12:3ca5:0:640:6959:4d4a]) by forward501b.mail.yandex.net (Yandex) with ESMTP id 981425ED6E for ; Mon, 13 Feb 2023 23:00:23 +0300 (MSK) Original-Received: by myt5-69594d4a41fa.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id D0pfBF3ZDeA1-cEWBKD0d; Mon, 13 Feb 2023 23:00:23 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1676318423; bh=KregnTdk5XQungtMTSbWt7ivIrNXYdSwiXb2WYQ3Jnw=; h=In-Reply-To:Message-Id:Date:Subject:References:To:From; b=Uwce7WwsEPeDzK2zx66bs+3RZmYjh3XoNzRAlOg9znKlLSv+LeVJhphQUFF4YGAJK O5p66ADV/IWdztbJwH3MuUxsAcDPgpd9WzFSXgxy7i8D33yS8C9GWySeYFLhc/61ol 3yXM9ZDH9oLIToOdgivribGGlKZi1U0HRRxZixdw= Authentication-Results: myt5-69594d4a41fa.qloud-c.yandex.net; dkim=pass header.i=@yandex.ru X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230213200006.663502-1-Hi-Angel@yandex.ru> Received-SPF: pass client-ip=178.154.239.145; envelope-from=Hi-Angel@yandex.ru; helo=forward501b.mail.yandex.net X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255522 Archived-At: Originally discovered by Tyler Dodge in his article "Significant Garbage Collection Improvement For Emacs". While testing this change on Archlinux system with Intel i5-7200U CPU, average time of garbage collection gets reduced by ≈25%. While monitoring PSS of emacs with and without customizations loaded before and after the patch, no statistically significant differences were discovered. So overall, this change is a win. * src/alloc.c (BLOCK_ALIGN): increase from 2¹⁰ to 2¹⁵ --- src/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/alloc.c b/src/alloc.c index c25e81d1dde..d278b01343d 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1083,7 +1083,7 @@ lisp_free (void *block) BLOCK_BYTES and guarantees they are aligned on a BLOCK_ALIGN boundary. */ /* Byte alignment of storage blocks. */ -#define BLOCK_ALIGN (1 << 10) +#define BLOCK_ALIGN (1 << 15) verify (POWER_OF_2 (BLOCK_ALIGN)); /* Use aligned_alloc if it or a simple substitute is available. -- 2.39.0