From: Dmitry Gutov <dgutov@yandex.ru>
To: npostavs@users.sourceforge.net
Cc: 25995@debbugs.gnu.org, Alexis <flexibeast@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 [thread overview]
Message-ID: <f934a35d-22b1-59ca-dbf2-5166168fe67c@yandex.ru> (raw)
In-Reply-To: <87injsr6yz.fsf@users.sourceforge.net>
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!
next prev parent reply other threads:[~2017-06-21 2:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 11:12 bug#25995: 26.0.50; Mismatch between documented and actual behaviour of icomplete Alexis
2017-03-09 23:25 ` npostavs
2017-06-19 0:19 ` Dmitry Gutov
2017-06-19 3:28 ` npostavs
2017-06-21 2:04 ` Dmitry Gutov [this message]
2017-06-21 2:50 ` npostavs
2017-06-21 22:17 ` Dmitry Gutov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f934a35d-22b1-59ca-dbf2-5166168fe67c@yandex.ru \
--to=dgutov@yandex.ru \
--cc=25995@debbugs.gnu.org \
--cc=flexibeast@gmail.com \
--cc=npostavs@users.sourceforge.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).