[Python Wpg] Sort a list of tuples!
Stuart Williams
stuartw at mts.net
Mon Apr 24 22:00:53 EDT 2006
>>>>> Mark Jenkins writes:
> Avoiding random access (list[#]) might make a big performance
> difference too, I read that lists in emacs lisp are implemented as
> linked lists, which made me wonder how python lists are
> implemented. Does anyone know? (or have the time to find out?)
Python lists are arrays allocated from the heap that are resized as
necessary, but when they grow memory is over-allocated (proportional
to the list size) to reduce the number of allocations on a list that
slowly grows, for example via append.
Stuart.
More information about the Winnipeg
mailing list