Speed: bytecode vz C API calls

Jacek Generowicz jacek.generowicz at cern.ch
Fri Dec 12 07:20:44 EST 2003


bokr at oz.net (Bengt Richter) writes:

> On 12 Dec 2003 11:17:16 +0100, Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> 
> >bokr at oz.net (Bengt Richter) writes:
> >
> >To be honest, I have trouble believing that a local variable lookup
> >would be significantly faster than a closure lookup ... or is there
> >some other point to this ?
>
> No, I think you are right. I was mainly reacting to the "there's no
> way" statement ;-)

Sure ... I was sort of answering to a few posts upthread, as I hadn't
done that yet.

> >I get your version being almost imperceptibly slower.

> When things are that close, it's very hard to draw conclusions
> except that they are probably close ;-) But to split hairs you
> probably have to run the two tests separately, in quiescent system
> situations,

... when it's that close, I just don't care :-)

When it's that close, the Python version, CPU, temperature, phase of
the moon etc. are probably more significant than the algorithm
... and, most importantly, my time is better spent on finding more
effective ways of speeding up my code.

> I don't have your "timing" module,

Are you sure? It's on every Python installation I currently have
access to, so I assumed it was in the standard distribution. Hmm
... OK, the library reference lists it under "Obsolete".





More information about the Python-list mailing list