GNU bug report logs - #51293
29.0.50; [PATCH] Avoid excessive specbinding in all-completions

Previous Next

Package: emacs;

Reported by: miha <at> kamnitnik.top

Date: Tue, 19 Oct 2021 21:55:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 51293 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: miha <at> kamnitnik.top
Cc: 51293 <at> debbugs.gnu.org
Subject: Re: bug#51293: 29.0.50; [PATCH] Avoid excessive specbinding in
 all-completions
Date: Wed, 20 Oct 2021 10:21:06 +0200
miha <at> 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




This bug report was last modified 3 years and 270 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.