get-a-cup-of-coffee slow
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Tue Aug 14 14:31:28 EDT 2001
Sat, 11 Aug 2001 17:10:10 GMT, Courageous <jkraska1 at san.rr.com> 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.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
More information about the Python-list
mailing list