emacs-devel
[Top][All Lists]
Advanced

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

Re: What to do for faster `remove-duplicates'?


From: Stefan Monnier
Subject: Re: What to do for faster `remove-duplicates'?
Date: Wed, 06 May 2015 16:54:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>>> Looks good, please install.
>> Not so good as now it is no more destructive for a seq > 100.

Not being destructive doesn't seem like a serious problem to me.
`delete-*' functions are allowed to work destructively (as an
optimization) but if they don't, I wouldn't hold it against them, as
long as they're still fast.

> modified   lisp/subr.el
> @@ -424,12 +424,12 @@ one is kept."
>            (unless (gethash elt hash)
>              (puthash elt elt hash)
>              (push elt res)))
> -        (nreverse res))
> +        (setcdr list (cdr (nreverse res))))

I don't understand what this is intended to do.


        Stefan



reply via email to

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