Re: Surprising (for me) benchmark results...
by Courageous other posts by this author
May 2 2001 12:15PM messages near this date
Re: curry and compose -- functional language constructs
|
Re: Surprising (for me) benchmark results...
> If you want to consider things that way then you have to worry
> about Python's list extension, which last I heard was O(N**2)...
NO.
list.append() appends items to a dynamic array in O(1)+k
constant amortized time. It does this by using a liberal preallocation
strategy, and leaving empty slots into which new elements can
be placed. The occasional realloc() amortizes away quite readily.
C//
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Courageous
Toby Dickenson
Alex Martelli
Courageous
Alex Martelli
Courageous
Daniel Berlin
Tim Peters
|