[omaha] psyco?
Jeff Hinrichs - DM&T
jeffh at dundeemt.com
Sat Jun 23 04:43:14 CEST 2007
On 6/22/07, Eli Criffield <elicriffield at gmail.com> wrote:
> I love when i find something cool.
>
> Maybe everyone already knows about Psyco,
> http://psyco.sourceforge.net/ but i just found it.
> Its speeds up your python code 2x to 100x with an unmodified Python
> interpreter and unmodified source code according to there website.
>
> I have a script that parses some big compressed log files and regex's
> out the information it needs.
>
> I didn't think psyco could do much because the IO and uncompressing
> the logs is probably what takes most of the time. It did help though,
> 63% faster. It went from 136mins to 86 mins by just adding 2 lines.
>
> import psyco
> psyco.full()
>
> It'll be interesting to see how it does on other things.
>
Ok, you made me curious. I just checked out psyco from svn and
installed it on my lappy. I ran through some of the tests in the
distribution and that was impressive. I haven't had a chance to try
it on a piece of production code yet. I've got a couple in mind, but
that will have to wait for a day or two<g>
Did you see how Armin used it to speed up the life.py example.
class LifeBoard:
...snipping the class def but lots of churning in there
import psyco
psyco.bind(LifeBoard)
Instead of doing a full, he just targets the most used class.
-jeff
More information about the Omaha
mailing list