unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57079: 29.0.50; Performance of seq-uniq is not very good
@ 2022-08-09 16:11 Stefan Kangas
  2022-08-09 16:47 ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Stefan Kangas @ 2022-08-09 16:11 UTC (permalink / raw)
  To: 57079

Severity: minor

`seq-uniq' is not very performant compared to `-uniq' (from dash.el) and
even slower compared to the recently removed `gnus-delete-duplicates':

    (benchmark-run 10000 (seq-uniq '(a c b c c a d)))
    => (0.355001481 1 0.2518970439999748)

    (benchmark-run 10000 (-uniq '(a c b c c a d)))
    => (0.006599549 0 0.0)

    (benchmark-run 10000 (gnus-delete-duplicates '(a c b c c a d)))
    => (0.0034537929999999997 0 0.0)

Could we improve the performance of `seq-uniq' for lists?


PS. `gnus-delete-duplicates' was recently removed but looks like this:

    (defun gnus-delete-duplicates (list)
      "Remove duplicate entries from LIST."
      (let ((result nil))
        (while list
          (unless (member (car list) result)
    	(push (car list) result))
          (pop list))
        (nreverse result)))





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

end of thread, other threads:[~2022-08-20 15:13 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-09 16:11 bug#57079: 29.0.50; Performance of seq-uniq is not very good Stefan Kangas
2022-08-09 16:47 ` Eli Zaretskii
2022-08-09 16:57   ` Lars Ingebrigtsen
2022-08-09 17:07     ` Eli Zaretskii
2022-08-09 17:21       ` Lars Ingebrigtsen
2022-08-09 17:45         ` Stefan Kangas
2022-08-09 17:18     ` Eli Zaretskii
2022-08-09 17:23       ` Lars Ingebrigtsen
2022-08-09 17:36         ` Eli Zaretskii
2022-08-09 17:50           ` Eli Zaretskii
2022-08-09 17:52           ` Lars Ingebrigtsen
2022-08-09 17:59             ` Eli Zaretskii
2022-08-09 18:03               ` Lars Ingebrigtsen
2022-08-09 18:16                 ` Eli Zaretskii
2022-08-09 19:35                   ` Juri Linkov
2022-08-12 13:16                     ` Lars Ingebrigtsen
2022-08-12 23:59                       ` Michael Heerdegen
2022-08-13 11:50                         ` Lars Ingebrigtsen
2022-08-13 20:24                           ` Michael Heerdegen
2022-08-15  6:39                             ` Lars Ingebrigtsen
2022-08-15 23:37                               ` Michael Heerdegen
2022-08-17 11:01                                 ` Lars Ingebrigtsen
2022-08-20  3:17                                   ` Michael Heerdegen
2022-08-20  9:19                                     ` Lars Ingebrigtsen
2022-08-20 15:13                                       ` Drew Adams

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