unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27560: 26.0.50; seq-uniq is slow
@ 2017-07-03  8:20 Nicolas Petton
  2017-07-03 13:16 ` Tino Calancha
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Petton @ 2017-07-03  8:20 UTC (permalink / raw)
  To: 27560; +Cc: ohwoeowho

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-03 14:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03  8:20 bug#27560: 26.0.50; seq-uniq is slow Nicolas Petton
2017-07-03 13:16 ` 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

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).