You can test leo with psyco V2 by just starting psyco in launchleo:
QQQ
import psyco
psyco.full()
import leo.core.runLeo
leo.core.runLeo.run()
QQQ
I ran unit tests, and saw modest improvements:
86.865 sec (without psyco)
70.781 sec (with psyco)
>> 86.865 sec (without psyco)
>> 70.781 sec (with psyco)
>
> Thanks for this report. Perhaps Leo should support a --psyco option.
> Enabling psyco in launchLeo.py works, but there is no easy way to enable it
> under control of the command line.
I don't think we should do "full" psyco'ing anyway, to prevent memory
bloat. Psyco is best applied in hand-picked code segments; perhaps we
should enable/disable psyco with g.use_psyco (just like we do with
unified nodes currently).
I don't think we should do "full" psyco'ing anyway, to prevent memory
bloat. Psyco is best applied in hand-picked code segments; perhaps we
should enable/disable psyco with g.use_psyco (just like we do with
unified nodes currently).
> I ran unit tests, and saw modest improvements:
>
>
> 86.865 sec (without psyco)
> 70.781 sec (with psyco)
>
> So, around ~20% improvement. However, that's for the test suite - if we had
> a proper benchmark about what leo really is used for, the resurts would be
> more apparent. Cherry-picking parts of Leo as psyco candidates will
> definitely be worth it.The fact that a "full" psyco round can be executed
> without problems, and with actual performance increase is impressive enough
> in itself.
I noted that psyco.full() is the only "easy" mode that provides
performance increase.
Now (with my fix-nhist branch), I got following results:
no psyco: 51sec
psyco.full() : 41 sec
psyco.profile(): 161 sec
psyco.background(): 76 sec
Apparently, profile / background cause pathological slowdown in some
areas towards the end of the test.
Now, it will be interesting to see where we can reap psyco's speedups
in extremely controlled fashion, e.g. using
import psyco
psyco.bind(myfunction1)
http://psyco.sourceforge.net/psycoguide/psycodotclasses.html
http://psyco.sourceforge.net/psycoguide/psycocompact.html
I noted that psyco.full() is the only "easy" mode that provides
performance increase.
Now (with my fix-nhist branch), I got following results:
no psyco: 51sec
psyco.full() : 41 sec
psyco.profile(): 161 sec
psyco.background(): 76 sec