From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.devel Subject: Re: MPS: weak hash tables Date: Mon, 08 Jul 2024 05:11:15 +0000 Message-ID: <30QY4MPWicZAEpf5sFM5VRGbtFA2S9kRVXdpxH6_NBL-tldtwG1w66f76BbDJ49eeXGP_10WLsknlXTCgAbkxdQzTP0bt-vUo14wW9ngnwk=@protonmail.com> References: <7PXYgVu5A8knQy6Q03cbm6FjO7s022nC0cqCRtUDhQBgA8ZrpLqmoVRgxD8moCTJpB_52ngFaJnW5JIflrzpHe09WcmbRqiHIdWQZE9kQgU=@protonmail.com> <87tth1xm4n.fsf@gmail.com> <87msmtxkpy.fsf@gmail.com> <87ed85xj67.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21732"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?Q?Gerd_M=C3=B6llmann?= , Ihor Radchenko , Eli Zaretskii , emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jul 08 13:03:25 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sQm9U-0005NE-Ue for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Jul 2024 13:03:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQm8Q-0008KC-8l; Mon, 08 Jul 2024 07:02:18 -0400 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 1sQgep-0003PX-F4 for emacs-devel@gnu.org; Mon, 08 Jul 2024 01:11:23 -0400 Original-Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQgem-0000Vy-Vr; Mon, 08 Jul 2024 01:11:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1720415478; x=1720674678; bh=p25mjMqtteuMf4txdf0E7q3f0ErPSJUnT7Pt0PsEM2k=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=StIDeEtyjYXqC/TL3Z+REEHh2lEs3p7V8ft0jnC6c9W3zQpAn4tZ4+BgUzcvAkYXy aq9WZkv5Jr15tZHS6qWeIGTXj3sGrZKlKLU2BmQcXwLhSjxUtNzNw83Sch2ImmnUXt JePGYqahrSL8hwJv/vjpc3oal6+v5Q1WdXUby34zW2bj1GYpBNlUz2YyEIOcIGrNyH U4dAH/NYg8XI4jk5iKS//qDk7kcsg6lq55yOYw6g5JdVScV2jYiZK1y92I0AJlGuKg aQ7rbIyhEDsFqfdbaEyKAKYtZDesKxA3eEkjTGdeDQj9VJRVDC1k7ibCJrRri90E59 ZoH1krWhgso2g== In-Reply-To: <87ed85xj67.fsf@gmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: a0f83034d96188bcd12aa8bd0f8313cd6ea31bca Received-SPF: pass client-ip=185.70.40.134; envelope-from=pipcet@protonmail.com; helo=mail-40134.protonmail.ch 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 08 Jul 2024 07:02:15 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321536 Archived-At: On Sunday, July 7th, 2024 at 16:26, Helmut Eller w= rote: > On Sun, Jul 07 2024, Pip Cet wrote: >=20 > > > You mean "stats", which includes results and possibly big objects of = the > > > previous tests, is included in the backtrace. And > > > ert-test-run-tests-batch-expensive prints it with altered printer > > > settings. Could be. > >=20 > > So > >=20 > > (cl-defmethod cl-print-object ((object ert--stats) stream)) > >=20 > > should help? It appears to... >=20 > Good idea! This makes ert-test-run-tests-batch-expensive definitely > less expensive. I've opened Bug#71988 to document the somewhat subtle change to the test th= at is required. Let's see what the others say. > Can we conclude something about igc from this? Maybe that it works as > it should. But also that it's not particularly good if the heap is > almost full with live objects. My conclusions for igc are: * it appears to work in non-pathological cases * there might be problems balancing string intervals, which we're going to = have to revisit at some point * building large strings by concatenating repeatedly might have worse perfo= rmance than it does on Emacs master, particularly if those strings have man= y text properties In summary, I think we're fine for now, but I think backtrace--filter-visib= le may require some attention: (defun backtrace--filter-visible (beg end &optional _delete) "Return the visible text between BEG and END." (let ((result "")) (while (< beg end) (let ((next (next-single-char-property-change beg 'invisible))) (unless (get-char-property beg 'invisible) (setq result (concat result (buffer-substring beg (min end next))= ))) (setq beg next))) result)) I think it would be better to create a list of strings and concatenate them= with a single call instead. Pip