GNU bug report logs - #25995
26.0.50; Mismatch between documented and actual behaviour of icomplete

Previous Next

Package: emacs;

Reported by: Alexis <flexibeast <at> gmail.com>

Date: Mon, 6 Mar 2017 11:13:01 UTC

Severity: minor

Tags: confirmed, fixed

Found in version 26.0.50

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: npostavs <at> users.sourceforge.net
Cc: 25995 <at> debbugs.gnu.org, Alexis <flexibeast <at> gmail.com>
Subject: bug#25995: 26.0.50; Mismatch between documented and actual behaviour of icomplete
Date: Wed, 21 Jun 2017 05:04:51 +0300
On 6/19/17 6:28 AM, npostavs <at> users.sourceforge.net wrote:

> I don't have a good sense of how the completion code fits together, so
> I'm not sure how significant the performance of this function is, but in
> my simplistic benchmark I found the opposite: dolist+push+nreverse is
> quite a bit faster (although the difference can be swamped by GC).  So
> adding `nreverse' won't be a problem.

Thank you for the benchmark file. Indeed, in batch mode my results are 
similar to yours:

dolist+push 1000
Elapsed time: 0.000135s
dolist+push 10000
Elapsed time: 0.001112s
dolist+push 100000
Elapsed time: 0.011830s
dolist+push+nreverse 1000
Elapsed time: 0.000130s
dolist+push+nreverse 10000
Elapsed time: 0.001084s
dolist+push+nreverse 100000
Elapsed time: 0.011518s
cl-delete-if 1000
Elapsed time: 0.001173s
cl-delete-if 10000
Elapsed time: 0.001621s
cl-delete-if 100000
Elapsed time: 0.017909s

When running it interactively, however (M-x eval-buffer, also starting 
with 'emacs -Q'), I'm getting consistently opposite results:

dolist+push 1000
Elapsed time: 0.000836s
dolist+push 10000
Elapsed time: 0.007698s
dolist+push 100000
Elapsed time: 0.045281s
dolist+push+nreverse 1000
Elapsed time: 0.000512s
dolist+push+nreverse 10000
Elapsed time: 0.007719s
dolist+push+nreverse 100000
Elapsed time: 0.186524s (0.140654s in 1 GCs)
cl-delete-if 1000
Elapsed time: 0.002603s
cl-delete-if 10000
Elapsed time: 0.003347s
cl-delete-if 100000
Elapsed time: 0.021793s

In any case, nreverse barely affects the runtime, so please go ahead and 
push the patch. Thanks!




This bug report was last modified 8 years and 64 days ago.

Previous Next


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