[Tutor] psyco 1.3 is out, with support for Python 2.4

Dick Moores rdm at rcblue.com
Mon Dec 6 12:46:30 CET 2004


Liam,

Kent Johnson was of great help in getting me started with psyco.

psyco's easy to implement, it seems, and can make an enormous difference 
in speed. The best example I've seen is my simple 
<http://www.rcblue.com/Python/spinForWeb.py>, where psyco speeds up the 
tiny while loop of spin(),

while k < max:
         k += 1

by 2 orders of magnitude. (But keep max <= 2**31-1).

In mine and Kent's 
<http://www.rcblue.com/Python/factorIntegers-forWeb-WithPsyco8.py> psyco 
also makes an important, but much lesser, difference to the speed of the 
workhorse function, factorsOfInteger(n). Here's an example: for
"400000000139252 400000000139300", my time using psyco is 22 seconds; 
without psyco, 34 seconds.

Here's what I learned from Kent about installing psyco (for Windows):
Download psyco from http://psyco.sourceforge.net. Unzip the zip file. 
Copy the folder psyco-1.3/psyco into Python24/Lib/site-packages. (Create 
site-packages if you don't already have it.) Should be good to go then.

Dick

Liam Clarke wrote at 02:18 12/6/2004:
>Have you used Pysco much Dick? Is it n00bie friendly?
>
>Or, to put it another way, at what point in a programme's size/speed
>does it become worthwhile to implement Pysco?
>
>Regards,
>
>Liam Clarke
>
>On Sun, 05 Dec 2004 23:49:03 -0800, Dick Moores <rdm at rcblue.com> wrote:
> > <http://psyco.sourceforge.net/>
> >
> > And "The Ultimate Psyco Guide" for 1.3 is at
> > <http://psyco.sourceforge.net/psycoguide/index.html>
> >
> > Dick Moores




More information about the Tutor mailing list