Concerns about performance w/Python, Pysco on Pentiums

A. Lloyd Flanagan alloydflanagan at attbi.com
Fri Mar 7 15:06:42 EST 2003


Tim Peters <tim.one at comcast.net> wrote in message news:<mailman.1047048253.15644.python-list at python.org>...
>
> Note that the eval loop special-cases list, but not tuple, subscripts, in
> the BINARY_SUBSCR opcode.  list[i] is done inline, tuple[i] ends up going
> thru the generic PyObject_GetItem.  If there's a surprise here, then, it's
> that tuple[i] isn't a *lot* slower than list[i].

Mostly out of curiousity, is there a reason for that difference, or
did it sort of 'just work out that way'?




More information about the Python-list mailing list