Subject: Re: bug#51293: 29.0.50; [PATCH] Avoid excessive specbinding in all-completions

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 20 Oct 2021 10:21:06 +0200

[email-masked] writes:

>   (dotimes (i 300)
>     (get-buffer-create (format " *test-buffer-%s*" i)))
>
>   (let ((completion-regexp-list '("\\`.*?")))
>     (benchmark-run-compiled 50
>       (all-completions "" obarray #'boundp)))
>
> 9.9 seconds without patch,
> 0.83 seconds with patch applied.

Impressive!

I've tested your patch, and everything seems to work for me (and all
tests pass).  It also simplifies the code, so I've pushed this to Emacs
29 now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no