On 12/18/2009 7:07 AM, Brendan Miller wrote:
As for copying pointers not taking much time... that depends on how long the list is. if you are working with small sets of data, you can do almost anything and it will be efficient. However, if you have megabytes or gigabytes of data (say you are working with images or video), than the difference between an O(1) or an O(n) operation is a big deal.
A 1-million member list takes ~130 msec, 10 million 1.3s. In many cases the algorithm would easily dwarf the copying itself.
-- http://mail.python.org/mailman/listinfo/python-list