From: Nicolas Petton <nicolas@petton.fr>
To: 27560@debbugs.gnu.org
Cc: ohwoeowho@gmail.com
Subject: bug#27560: 26.0.50; seq-uniq is slow
Date: Mon, 03 Jul 2017 10:20:14 +0200 [thread overview]
Message-ID: <8760farkxt.fsf@petton.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 733 bytes --]
Oleh (in Cc) did some benchmarks in May 2015, and `seq-uniq' is quite
slow:
(setq cands (locate-file-completion-table
load-path (get-load-suffixes) "" nil t))
(length cands)
5357
(length (cl-remove-duplicates cands :test 'equal))
2481
(benchmark-run (cl-remove-duplicates cands :test 'equal))
(0.67873101 0 0.0)
(benchmark-run (helm-fast-remove-dups cands :test 'equal))
(0.001350054 0 0.0)
(benchmark-run (seq-uniq cands 'equal))
(5.270219822 27 2.396615401000002)
One easy way to make it faster would be to use `cl-remove-duplicates'
for sequences (sequencep), and default to the current implementation for
other seqp data structures (which means stream.el currently AFAIK).
Nico
[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next reply other threads:[~2017-07-03 8:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-03 8:20 Nicolas Petton [this message]
2017-07-03 13:16 ` bug#27560: 26.0.50; seq-uniq is slow Tino Calancha
2017-07-03 13:50 ` Nicolas Petton
2017-07-03 13:52 ` Nicolas Petton
2017-07-03 14:09 ` Nicolas Petton
2017-07-03 14:19 ` Tino Calancha
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=8760farkxt.fsf@petton.fr \
--to=nicolas@petton.fr \
--cc=27560@debbugs.gnu.org \
--cc=ohwoeowho@gmail.com \
/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.