good way to do side effects on lists?
Eli Stevens (WG.c)
listsub at wickedgrey.com
Thu Sep 23 20:44:05 EDT 2004
Istvan Albert wrote:
> now let's turn on psyco:
>
> import psyco
> psyco.full()
...
> oh boy.
Judging from this post:
http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&selm=2259b0e2.0308240638.38350cba%40posting.google.com
It seems like Psyco can detect simple "hey, let's see how fast this can
go with Psyco" tests, and can give skewed results. I wouldn't expect a
50x improvement in the general case (though if you have to do simplistic
things over and over, Psyco is the way to go ;).
I'm not trying to bash Psyco - two lines netting a 2x speed boost is
great, but it's good to avoid setting expectations too high. :) I
started experimenting with Psyco a few weeks ago, and found I was
getting about 2x for my application. ISTR the docs saying that more
numerical stuff worked well with Psyco; the OP hinted that there was
number crunching involved. Certainly worth a look.
Eli
More information about the Python-list
mailing list