Why is Python so slow ?- revisited.
Michael Hudson
mwh21 at cam.ac.uk
Thu Jun 22 16:37:32 EDT 2000
bparsia at email.unc.edu (Bijan Parsia) writes:
> Michael Hudson <mwh21 at cam.ac.uk> wrote:
[snip]
> > Does Python 1.2 have the local variable optimisation?
>
> What do you mean?
>
> [snip]
Certainly at some point there was no LOAD_FAST opcode; every name
lookup would first look into a local dict, then the global one, then
the builtins. Now references to locals are just indexes into (C)
vectors; this is much quicker.
I don't know when this happened; it was quite a whiles back (before my
time by a long way), but so was Python 1.2!
Cheers,
M.
--
languages shape the way we think, or don't.
-- Erik Naggum, comp.lang.lisp
More information about the Python-list
mailing list