[Python-Dev] Python & GCC 3.0

Daniel Berlin dan@cgsoftware.com
19 Jun 2001 12:19:14 -0400


"Fred L. Drake, Jr." <fdrake@acm.org> writes:

> Barry A. Warsaw writes:
> > It'd be interesting to see if there are any performance
> > improvements, esp. on x86 boxen.

Except, I bet you didn't use one of the "optimize for a given cpu"
switches.

Try adding -mpentiumpro -march=pentiumpro to your compiler flags.

Otherwise, it's scheduling for a 386.  And the old x86 backend wasn't
all that bad at scheduling for the 386.   Hell, i'm not that bad at
scheduling for a 386.
:)

--Dan


> 
> GCC 2.95.3:
> 
> cj42289-a(.../python/linux); time ./python -tt ../Lib/test/pystone.py
> Pystone(1.1) time for 10000 passes = 1.58
> This machine benchmarks at 6329.11 pystones/second
> 1.66user 0.01system 0:03.40elapsed 49%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (280major+241minor)pagefaults 0swaps
> 
> GCC 3.0:
> 
> cj42289-a(.../python/linux); cd ../linux-gcc-3.0/
> cj42289-a(.../python/linux-gcc-3.0); time ./python -tt ../Lib/test/pystone.py
> Pystone(1.1) time for 10000 passes = 1.65
> This machine benchmarks at 6060.61 pystones/second
> 1.77user 0.01system 0:03.52elapsed 50%CPU (0avgtext+0avgdata 0maxresident)k
> 0inputs+0outputs (307major+239minor)pagefaults 0swaps
> 
> There is a little variation with multiple run, but it varies less than
> 5% from the numbers above.  Bumping up the LOOPS constant in
> pystone.py changes the numbers a small bit, but the relationship
> remains constant.
> 
> This is one a Linux-Mandrake 7.2 installation with non-cooker updates
> installed, and still using the Linux 2.2 kernel:
> 
> cj42289-a(.../python/linux-gcc-3.0); uname -a
> Linux cj42289-a.reston1.va.home.com 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i686 unknown
> 
> 
> 
>   -Fred
> 
> -- 
> Fred L. Drake, Jr.  <fdrake at acm.org>
> PythonLabs at Digital Creations
> 
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev

-- 
"If all the nations in the world are in debt, where did all the
money go?
"-Steven Wright