Subject: Re: bug#52753: 29.0.50; Printing long list-like structures fails

From: Ihor Radchenko <[email-masked]>
Date: Thu, 02 Jun 2022 21:12:56 +0800

Mattias Engdegård <[email-masked]> 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 versions.

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