[Python-Dev] collections module

Zack Weinberg zack at codesourcery.com
Fri Jan 9 02:23:24 EST 2004


Josiah Carlson <jcarlson at uci.edu> writes:

>> None of those can compete with my proposed C implementation
>> which pre-allocates around 50 cells at a time and does it's
>> read/writes through array lookups.  It avoids all the expensive
>> resizing of list and uses C ints instead of PyInts.
>
> That's pretty crazy.  If I had a say, I'd be +1 just because I've seen
> so many people using their own {append, pop(0)} queues before.

As a user of Python, I am +1 on making there be a *really really fast*
queue data structure somewhere, but -0 on its being something other
than the existing Queue class.  Can't we just optimize the one we've
got?  Ideally without losing the thread safety guarantees (but making
it usable in an unthreaded program would be nice)?

zw



More information about the Python-Dev mailing list