From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Newsgroups: gmane.emacs.bugs Subject: bug#68244: hash-table improvements Date: Sun, 07 Jan 2024 17:39:06 +0200 Message-ID: <5684d8e9-62b8-42bb-8560-d3f6a30a9cd7@app.fastmail.com> References: <170438379722.3921.9312235725296561206@vcs2.savannah.gnu.org> <20240104155642.B4A99C00344@vcs2.savannah.gnu.org> <8d49ebdc-9da7-4e70-a080-d8e892b980b6@gutov.dev> <08314177-5AE9-4352-94A0-641830B4094D@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20c4aef6b8414ba9acf9222fe27def77 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17054"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , 68244@debbugs.gnu.org, Eli Zaretskii To: "Stefan Monnier" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 07 16:40:17 2024 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 1rMVG4-0004AD-MO for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 07 Jan 2024 16:40:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rMVFm-0004N4-H7; Sun, 07 Jan 2024 10:39:58 -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 1rMVFl-0004Mu-5b for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 10:39:57 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rMVFk-0006Nl-TC for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 10:39:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rMVFq-0002sU-Gj for bug-gnu-emacs@gnu.org; Sun, 07 Jan 2024 10:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jan 2024 15:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68244 X-GNU-PR-Package: emacs Original-Received: via spool by 68244-submit@debbugs.gnu.org id=B68244.170464198011025 (code B ref 68244); Sun, 07 Jan 2024 15:40:02 +0000 Original-Received: (at 68244) by debbugs.gnu.org; 7 Jan 2024 15:39:40 +0000 Original-Received: from localhost ([127.0.0.1]:33594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMVFU-0002rk-FP for submit@debbugs.gnu.org; Sun, 07 Jan 2024 10:39:40 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:43527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rMVFS-0002rV-SU for 68244@debbugs.gnu.org; Sun, 07 Jan 2024 10:39:39 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 1390D3200A3B; Sun, 7 Jan 2024 10:39:26 -0500 (EST) Original-Received: from imap48 ([10.202.2.98]) by compute1.internal (MEProxy); Sun, 07 Jan 2024 10:39:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1704641966; x=1704728366; bh=2Ga+EVwuzI L58Hp8+HO1TOSTzzgL2WIF0H5GhCda3kQ=; b=KeCtfgiXA9adPQhTSGLxMAQUmU TCL5ROvB1j4IgC8Fwyh2RxB2koQX215UsZy9cBMUhlNcvpd1c1GSchgkPDAiXTHO ChcKH9DEgnYkNoQ9Va1JuIeEUedrRq40vRhDkJGp8ECSlerkg7Z3o8DM97tEa2Wl vbA85dyhHYZjAtpm97E+hwQnOWGvXPmsOZF9YJqYiWyqvx/8te1m3g830I9V2cix H2IyiGU3t+1yVhDSXoK/57+WPqG0XGou96cq9qq9t5J50Gbio0KzfI2EhqY7ZjwF S7wRbqI3zA+iKrediCzL7LSnccShX4X8iBJQwdFeCRv0+20yeTu9iJMLZktg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1704641966; x=1704728366; bh=2Ga+EVwuzIL58Hp8+HO1TOSTzzgL 2WIF0H5GhCda3kQ=; b=BQauCGb3j8rkrKb24GmCki+mxZDx+zTM+W1UvxcG0+u4 Feg8pgrj8VhM9lUiKAyv7HQUIFNfmq/d2/GiU8Ot1ZfS+W/mu8K9o8QHhRv8ZO+B Nb4QUs3R7CHDSAFOz2WE0hfzFi8xjWABey5vy0RF4IpBgLWmQR3iRfY1nxziXfzL RSBCPH41dQGyGGHIli97IGNdaRGcGGr6lbs6yIwG6t1tgB53xHICTSFBDPNRvXBr do7oTJpiBZPPhRCdP/PiNKwA0HUvJuqZTuyiXY82jbO9uYNxRHo9x5+kzzZHRu/f kyKWs4X4jjssvfqW1Uu1iXHdXKULnzsWKYPGVnt7LA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdehgedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsegrtderreerredtnecuhfhrohhmpeffmhhi thhrhicuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvghrnhepve fgiedvfffghfduuefhheejgeelheffteetffdtveeiffevudefleevtdehueefnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmihhtrhihse hguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4EC2431A0065; Sun, 7 Jan 2024 10:39:26 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: 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:277506 Archived-At: --20c4aef6b8414ba9acf9222fe27def77 Content-Type: text/plain On Sun, Jan 7, 2024, at 7:26 AM, Stefan Monnier wrote: > Side note: I think reasoning won't get us out of this: either we decide > the choice is important, and then we try and do some > profiling/benchmarking That's what I was going to suggest, but concluded that dropping the tallying increments in any of these constructors can lead to risky behavior in degenerate cases. > The use of memory allocation as a way to decide when to do the next GC > is just a crude tool anyway, which can often result in bad GC decisions, > anyway (e.g. typically during long periods of initialization where we > allocate many objects but don't generate almost any garbage). Indeed, we have a latency/throughput tradeoff here with the current system, so it would be tempting to reduce the frequency of GCs at least in some cases. --20c4aef6b8414ba9acf9222fe27def77 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Sun, Jan 7, = 2024, at 7:26 AM, Stefan Monnier wrote:
Side note: I think reasoning won't get us o= ut of this: either we decide
the choice is important, and = then we try and do some
profiling/benchmarking
That's what I was going to suggest, but concluded that dropp= ing the tallying increments in any of these constructors can lead to ris= ky behavior in degenerate cases.
The use of memory allocation as a way to decide when t= o do the next GC
is just a crude tool anyway, which can of= ten result in bad GC decisions,
anyway (e.g. typically dur= ing long periods of initialization where we
allocate many = objects but don't generate almost any garbage).
Indeed, we have a latency/throughput tradeoff here with the current s= ystem, so it would be tempting to reduce the frequency of GCs at least i= n some cases. --20c4aef6b8414ba9acf9222fe27def77--