From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ihor Radchenko Newsgroups: gmane.emacs.bugs Subject: bug#52753: 29.0.50; Printing long list-like structures fails Date: Thu, 02 Jun 2022 21:12:56 +0800 Message-ID: <87pmjr9pk7.fsf@localhost> References: <8D1C448B-B6AB-4746-896C-A992CC79776A@acm.org> 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="2296"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52753@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 02 15:15:30 2022 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 1nwkfi-0000QN-4k for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jun 2022 15:15:30 +0200 Original-Received: from localhost ([::1]:54208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwkfg-0002Ds-Ud for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Jun 2022 09:15:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwkdK-0000YH-L0 for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 09:13:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59207) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwkdK-0006WB-BQ for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 09:13:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwkdK-0004lH-2h for bug-gnu-emacs@gnu.org; Thu, 02 Jun 2022 09:13:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Jun 2022 13:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52753 X-GNU-PR-Package: emacs Original-Received: via spool by 52753-submit@debbugs.gnu.org id=B52753.165417554718251 (code B ref 52753); Thu, 02 Jun 2022 13:13:02 +0000 Original-Received: (at 52753) by debbugs.gnu.org; 2 Jun 2022 13:12:27 +0000 Original-Received: from localhost ([127.0.0.1]:53104 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkcl-0004kJ-8R for submit@debbugs.gnu.org; Thu, 02 Jun 2022 09:12:27 -0400 Original-Received: from mail-pj1-f46.google.com ([209.85.216.46]:51915) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwkci-0004k5-Vn for 52753@debbugs.gnu.org; Thu, 02 Jun 2022 09:12:26 -0400 Original-Received: by mail-pj1-f46.google.com with SMTP id cx11so4904960pjb.1 for <52753@debbugs.gnu.org>; Thu, 02 Jun 2022 06:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=s9c/Tp/m4eyreb2+49KGoG/NSw/yLRSuuXgP4n6StsE=; b=LR+xaZaLNgcZ/zzrF0rKdTC+GGnBCqYebT6hFdmnI6kDLkztuapp6emq9dSsmGSQEC R24A0v2k1Gsvidtd0ojo12DDSSBB/Ho1kqndbD0zRScqhttzZMPZ8wj1eelO01lFui87 ztbz+604WSbw1y3YnCoSBbzNMRRSPSEi4jIBS7v3j8r9XLfYB4a7SzmT6ywPVZtexTlX kWlDH3oHXA9gbvp2s4Kwr0CBNb/EJwgp5rsDvWju+1PxfBQLahsgGsIApHZ+Dl4VPeHn Z7JZQELCgWZ1tVbw+yt6/ILbkvHK5NMIPv1USHjS9l/y8HL3/Y+WHhQMU4rsZry9zlRO BZLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=s9c/Tp/m4eyreb2+49KGoG/NSw/yLRSuuXgP4n6StsE=; b=q5tBH9WpkzsBk3UTR7LRHIHJWu+XJhzLU0Kv0Qf/mYp2o1JAYEsTmKIbt+u0j1BN1t +yORGTeP2VlxtPlGw2+2HQF7oQsITWcboaiplKnbt38vEsF1lEuC2EOja2U9lEib0ZrT sIaMt34ZWb3izn/Tr7PBEDhwKVZ2OL2I2sM13qlvGNe40GyMgDIqdPCXKNjA2BkvHlGp d7m0nYxsLFwIZL9jQ6UnqlCGAMbZ/8XBBHwKxG+CG7p/reLJMY3yT/gOo1GyL0UzUB7N +QJh5Ow8AAboG4ZZ/pqAOaqA70rKYhFwDPUPuatdDSCSLKQ2XcjtlhtyfvfZwmpTFwTa BfqA== X-Gm-Message-State: AOAM5314Mj75zZ0TT91FKWWCYE+O7eIswqL8Wgg+IbT0fQB9zp4jcm8m 93OSn/OKT+MXC4azIp5xCbU= X-Google-Smtp-Source: ABdhPJxre0+OU6cW4OdiJAP1KL+HsWxLC6vpe8m7VmkfqB4DqedyqyI73js5xQvwCe10Q+LgMiZPdA== X-Received: by 2002:a17:902:e552:b0:163:6a5e:4e0d with SMTP id n18-20020a170902e55200b001636a5e4e0dmr4950045plf.66.1654175538879; Thu, 02 Jun 2022 06:12:18 -0700 (PDT) Original-Received: from localhost ([23.27.206.157]) by smtp.gmail.com with ESMTPSA id j21-20020a170902759500b001620eb3a2d6sm3421371pll.203.2022.06.02.06.12.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jun 2022 06:12:18 -0700 (PDT) In-Reply-To: <8D1C448B-B6AB-4746-896C-A992CC79776A@acm.org> 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" Xref: news.gmane.io gmane.emacs.bugs:233549 Archived-At: Mattias Engdeg=C3=A5rd writes: > This should work in Emacs 29 (master) now; the reader, printer and > garbage collector now cope better with deep structures. Thanks! I re-tested my reproducer with the latest Emacs and the error is gone. I was not able to trigger crashes either. Feel free to close this bug. > On the other hand you may want something that works on older Emacs versio= ns. I am currently playing with an alternative approach. Simply caching recent avl-tree queries into a short vector can improve the search time nearly 2x (according to real-usage statistics). The idea is described in Pugh [Information Processing Letters] (1990) Slow optimally balanced search strategies vs. cached fast uniformly balanced search strategies. http://dx.doi.org/10.1016/0020-0190(90)90130-P Best, Ihor