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

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

bug#25995: 26.0.50; Mismatch between documented and actual behaviour of


From: Dmitry Gutov
Subject: bug#25995: 26.0.50; Mismatch between documented and actual behaviour of icomplete
Date: Wed, 21 Jun 2017 05:04:51 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0

On 6/19/17 6:28 AM, npostavs@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!





reply via email to

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