get-a-cup-of-coffee slow

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Aug 15 06:13:46 EDT 2001


14 Aug 2001 18:31:28 GMT, Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> pisze:

>> Python lists are tail-preallocated vectors. Therefore, adding to the
>> end of a list occurs in (close to*) amortized constant time.
>> 
>> (*) note that while this statement isn't strictly true, it's as
>> true as it needs to be. :)
> 
> It used to be not strictly true, but it's true in Python 2.1a.

Sorry, I meant version 2.2a1. Ditto when in another thread I
was talking about a plethora of new types coming from type/class
unification.

-- 
 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
 \__/
  ^^                      SYGNATURA ZASTĘPCZA
QRCZAK



More information about the Python-list mailing list