Steve Howell wrote:
> There is also the possibility that my initial patch can be refined by
> somebody smarter than myself to eliminate the particular tradeoff.
> In fact, Antoine Pitrou already suggested an approach, although I
> agree that it kind of pushes the boundary of sanity. :)

I'm actually wondering if you could apply some of the implementation
strategies discussed here to grant O(1) random access to arbitrary
elements of a deque.

I haven't looked at the deque code in a long time, but I believe the
memory structure is already larger than that for a basic list. Reworking
the way that extra space is used may be a more fruitful strategy than
trying to convince anyone that it is worth changing the list
implementation for this corner case.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to