benchmark

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Thu Aug 7 06:10:09 EDT 2008


jlist:
> I think what makes more sense is to compare the code one most
> typically writes. In my case, I always use range() and never use psyco.

If you don't use Python 3 and your cycles can be long, then I suggest
you to start using xrange a lot :-) (If you use Psyco you don't need
xrange).


M8R-n7v...:
> Wonder what optimisation level you are using. I to the best of my
> recollection used -O3

For this program I have used the best (simple) combination of flags I
have found by try & errors:
-O3 -s -fomit-frame-pointer

I'll try adding a freelist, to see (and probably show you) the
results. The HotSpot speeds up this code first of all because its GC
is much better than the current one used by D, because it optimizes
away the getters/setters that D is unable to do, and probably manages
the methods two classes as static ones (while D manages all of them as
virtual).

Bye,
bearophile



More information about the Python-list mailing list