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

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

[debbugs-tracker] bug#27560: closed (26.0.50; seq-uniq is slow)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#27560: closed (26.0.50; seq-uniq is slow)
Date: Mon, 03 Jul 2017 14:10:03 +0000

Your message dated Mon, 03 Jul 2017 16:09:02 +0200
with message-id <address@hidden>
and subject line Re: bug#27560: 26.0.50; seq-uniq is slow
has caused the debbugs.gnu.org bug report #27560,
regarding 26.0.50; seq-uniq is slow
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
27560: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27560
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.0.50; seq-uniq is slow Date: Mon, 03 Jul 2017 10:20:14 +0200
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: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#27560: 26.0.50; seq-uniq is slow Date: Mon, 03 Jul 2017 16:09:02 +0200
Nicolas Petton <address@hidden> writes:

>> Indeed, I will run some benchmarks as well. In your benchmarks, cl-lib
>> is still much faster than seq-uniq, even if it's not as impressive as
>> Oleh's benchmark.
>
> It looks like I read the benchmark results wrong :)

seq-uniq seems to be much faster than in 2015, while its definition
basically hasn't changed.  I won't investigate much further as I'm happy
with then benchmark results.

Nico

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

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