Python speed vs csharp

Richie Hindle richie at entrian.com
Fri Aug 1 05:13:45 EDT 2003


[Richie]
> Using Psyco dropped from 7.1 seconds to 5.4 - not great, but not bad for
> two lines of additional code:
>     import psyco
>     psyco.bind(erfc)

[Lulu]
> Try these two lines instead:
> 
>     import psyco
>     psyco.full()
> 
> 18 seconds -> 3.25 seconds.

I tried that the first time but saw no improvement over bind... having
checked the Psyco docs I see that it won't optimise code at module scope,
and I had my driver loop at module scope.  I now get 1.25 seconds down
from 7.1 - slightly faster than Pyrex.  Impressive.

[OT: I hope Pyrex isn't suffering as a result of people writing little
     test scripts full of module-level code and being disappointed at the
     results.]

-- 
Richie Hindle
richie at entrian.com






More information about the Python-list mailing list