bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51293: 29.0.50; [PATCH] Avoid excessive specbinding in all-completio


From: Lars Ingebrigtsen
Subject: bug#51293: 29.0.50; [PATCH] Avoid excessive specbinding in all-completions
Date: Wed, 20 Oct 2021 10:21:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

miha@kamnitnik.top 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]