[Python-Dev] Python & GCC 3.0
M.-A. Lemburg
mal@lemburg.com
Tue, 19 Jun 2001 18:55:47 +0200
"Fred L. Drake, Jr." wrote:
>
> Barry A. Warsaw writes:
> > It'd be interesting to see if there are any performance
> > improvements, esp. on x86 boxen.
>
> 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
Note that if you really want to see a speedup for x86 boxes then
you should take a look at PGCC, the Pentium GCC compiler group:
http://www.goof.com/pcg/
You can then adjust the compiler to various x86 CPUs and
take advantage of some special optimizations they have intergrated
into 2.95.2.1.
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.lemburg.com/python/