Concerns about performance w/Python, Pysco on Pentiums
Peter Hansen
peter at engcorp.com
Fri Mar 7 19:57:22 EST 2003
Skip Montanaro wrote:
>
> Peter> Py2.2, list, inlined: 16468, 108%
> Peter> Py2.3, list, inlined: 19074, 126%
> Peter> Py2.2, list, inlined, Psyco: 9963, 66% (!)
>
> Peter> Not sure what that last one indicates, except that under certain
> Peter> circumstances (perhaps when used by someone who hasn't even read
> Peter> it's documentation? :-), Psyco can produce *worse* results.
>
> How exactly are you using Psyco? If you let it figure out which routines to
> specialize, it generally does a poor job. If you know where your hotspots
> are, you can tell it to just specialize those routines.
At first I tried binding all the opcode handler functions, and the
Opcode class, and the Cpu class. A little experimentation showed that
ditching the opcode handlers increased performance, so now I just
do the two classes. Are you suggesting picking only some methods
in the classes would help?
At this point, actually, I need to do one thing before going any
further makes sense: profile the code. And read the Psyco manual.
Two things I must do before it makes sense. Profile, RTFM, and
develop a _need_ for greater performance. *Three* things... there
are three things I need. Oh bugger...
-Peter
More information about the Python-list
mailing list