Python 2 times slower than Perl

Skip Montanaro skip at
Wed Jul 18 20:10:12 CEST 2001

    Johann> cc -O2       0.28
    Johann> cc           0.62
    Johann> ocamlopt     1.26   (compiled)
    Johann> ocaml        9.42   (interpreted)
    Johann> perl        28.9
    Johann> python      66.8

    Johann> Hm.  I'm beginning to wonder if I compiled python with -O2 or
    Johann> not.  Plus, I'm becoming more and more fond of ocaml.

I pass along a couple tips that were mentioned to me recently on python-dev:

    1. Grep sys.prefix + "/config/Makefile" for OPT

    2. Import distutils.sysconfig then execute 


Skip Montanaro (skip at

More information about the Python-list mailing list