[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27560: 26.0.50; seq-uniq is slow
From: |
Nicolas Petton |
Subject: |
bug#27560: 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
signature.asc
Description: PGP signature
- bug#27560: 26.0.50; seq-uniq is slow,
Nicolas Petton <=