From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: schwab@suse.de, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: [harder@ifa.au.dk: Speed of all-completions]
Date: Fri, 18 Jun 2004 13:45:56 -0500 (CDT) [thread overview]
Message-ID: <200406181845.i5IIjuj07569@raven.dms.auburn.edu> (raw)
In-Reply-To: <x5pt80g6ik.fsf@lola.goethe.zz> (message from David Kastrup on 15 Jun 2004 17:55:47 +0200)
David Kastrup wrote:
> Is one single prolonged binding using specbind expensive or was the
> efficiency problem completely caused by the fact that it was used
> countless times in a loop?
The single prolonged binding is expensive, as in most cases the loop
is not entered even once.
At least that's what I understood.
Does not look like it. I could provide a patch and timings showing
that with one single binding around essentially the entire functions
and _without_ the `if (CONSP (Vcompletion_regexp_list))', there is a
10-fold improvement (in Jesper's example), if completion-regexp-list
is non-nil and a negligible deterioration if it is nil (everything
compared with the current CVS code).
However, before going into that, something else needs to be looked at.
Binding (essentially) around the entire functions means that the
binding is also in effect around the call to PREDICATE. Actually, if
PREDICATE uses case-fold-search, the binding either _should_ be in
effect, or PREDICATE should explicitly bind case-fold-search itself.
The _one single_ problem with the one prolonged binding might occur if
PREDICATE asks questions to the user in the minibuffer. We have
forgotten the user defined value and it can not be restored. But it
should be restored, because otherwise the user might be confused.
It probably is possible to use all-completions and friends in an
unusual way (that is, for purposes other than minibuffer completion),
where PREDICATE _could_ ask minibuffer questions. _If so_, then we
either have to stick with the present version or apply your patch.
Sincerely,
Luc.
next prev parent reply other threads:[~2004-06-18 18:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-13 21:48 [harder@ifa.au.dk: Speed of all-completions] Richard Stallman
2004-06-13 22:22 ` Andreas Schwab
2004-06-14 23:27 ` David Kastrup
2004-06-15 0:04 ` Luc Teirlinck
2004-06-15 7:29 ` David Kastrup
2004-06-15 11:00 ` Andreas Schwab
2004-06-15 11:28 ` David Kastrup
2004-06-15 12:13 ` Andreas Schwab
2004-06-15 13:27 ` David Kastrup
2004-06-15 13:40 ` Andreas Schwab
2004-06-15 13:48 ` David Kastrup
2004-06-15 14:08 ` Andreas Schwab
2004-06-15 14:19 ` David Kastrup
2004-06-15 14:32 ` Andreas Schwab
2004-06-15 15:42 ` Luc Teirlinck
2004-06-15 15:55 ` David Kastrup
2004-06-18 18:45 ` Luc Teirlinck [this message]
2004-06-19 3:19 ` Richard Stallman
2004-06-20 22:35 ` David Kastrup
2004-06-15 18:13 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200406181845.i5IIjuj07569@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=emacs-devel@gnu.org \
--cc=rms@gnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.