deque vs list: performance notes

Christian Tismer tismer at tismer.com
Sat Jun 3 12:27:16 EDT 2000


Russell Turpin wrote:
> 
> Christian Tismer wrote:
> > Please note that there is an alternative to using doubly linked
> > lists ..
> 
> My miscommunication. When I said deque, I didn't mean linked
> lists, but just a vector that is allocated with spare space
> at both ends, at least whenever elements are added to or
> removed from the start. There's really no reason to copy or
> reallocate a vector, every time the first element is
> deleted or inserted.  I think vector is the clear choice
> over linked list as a default implementation; but I still
> want to be able to add and remove from both ends efficiently.

The first message in this thread starts with
"""
A C-native bidirectionally linked list (deque) was
tested versus the performance of native python lists
as a LIFO. Items were appended to the end of each
data structure, but always removed from the beginning.
"""

and it was clearly meant this way along all of the discussion.
I'm not riding dead horses when everybody but you got a
different idea of what we're talking about.
I was looking for a message where I could hook my
point to, and you'r was the one with the "deque wish" :-)

So, repeating my self:
I'm against a linked list deque implementation for Python.
But I'm plus 1 on doing it as an extension of lists.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at appliedbiometrics.com>
Applied Biometrics GmbH      :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com




More information about the Python-list mailing list