bearophileHUGS at bearophileHUGS at
Thu Aug 7 12:10:09 CEST 2008

> 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

> 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


More information about the Python-list mailing list