emacs-devel
[Top][All Lists]
Advanced

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

Re: master 3e5298f: Improve performance of seq-union


From: Robert Pluim
Subject: Re: master 3e5298f: Improve performance of seq-union
Date: Mon, 27 Sep 2021 17:21:17 +0200

>>>>> On Mon, 27 Sep 2021 17:07:39 +0200, Lars Ingebrigtsen <larsi@gnus.org> 
>>>>> said:

    Lars> Robert Pluim <rpluim@gmail.com> writes:
    >> Utterly idle thought: would packages that tend to generate long lists
    >> and reverse them, such as Gnus, benefit from a builtin-in queue data
    >> type that supported efficient appending?

    Lars> A new data structure that has both head and a tail pointer?  I think
    Lars> you'd be hard pressed to get that to be faster than push+nreverse 
unless
    Lars> you implement it in C -- nreverse is very fast.

Intuitively, such a data structure needs to do less work than
nreverse, but it has to maintain the tail pointer, which should be a
net win.

    Lars> But I could be wrong.

Iʼve not implemented and measured it :-)

Robert
-- 



reply via email to

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