[BangPypers] Tuples vs Lists, perfromance difference
sidharth.kuruvila at gmail.com
Tue Dec 22 16:13:07 CET 2009
I don't think you should see and difference in performance. Lists
might take a bit more space since they usually preallocate memory for
I'd go for lists where ever i need to use an array or a list, and
tuples for storing records.
On Tue, Dec 22, 2009 at 7:10 PM, Vishal <vsapre80 at gmail.com> wrote:
> I was presuming that since tuples are immutable, like strings, and string
> immutability increases performance (
> so also, using tuple would improve performance over Lists.
> is this presumption correct?
> if it is, then as a practice, If I know the contents of my sequence at the
> time of initialization and the fact that the sequence is not going to change
> at runtime, would it be always good to use tuples instead of lists.
> Any views on this one?
> Thanks and best regards,
> Vishal Sapre
> BangPypers mailing list
> BangPypers at python.org
I am but a man.
More information about the BangPypers