performance of tuple-less Python?

Michael Hudson mwh21 at cam.ac.uk
Mon Nov 29 12:38:25 EST 1999


"Greg Wilson" <gvwilson at nevex.com> writes:

> Has anyone ever built a version of Python that didn't include tuples, and
> looked at the performance of code that consistently used lists instead?  

I doubt it.

> I'm curious as to whether the use of tuples (which I believe are
> conceptually redundant) actually has a significant positive impact
> on the interpreter's performance on non-trivial codes (i.e. once
> caching, instruction ordering, and all other effects have come into
> play).

Tuples are immutable. This is important in some respects; they're
hashable for instance, and can be guaranteed not to contain cycles.

I don't think they're there for reasons of performance.

M.




More information about the Python-list mailing list