[Python-Dev] Building a Faster Python

Ronald Oussoren ronaldoussoren at mac.com
Mon Jul 22 07:59:33 CEST 2013


On 22 Jul, 2013, at 1:36, Raymond Hettinger <raymond.hettinger at gmail.com> wrote:

> Our current Mac OS X builds use GCC-4.2.
> 
> On Python2.7, I ran a comparison of gcc-4.2.1 builds
> versus gcc-4.8.1 and found that the latter makes a much
> faster Python.  PyBench2.0 shows the total running time
> dropping from 5653ms to 4571ms.  The code is uniformly
> better in just about every category.

Have you tried using clang from the latest devtools as well?

The OSX binary installers are build using the developer tools from
Apple, that happen to use gcc 4.2 on the machine used to build at
least the 32-bit binary installer (as that's the latest Xcode
that includes PPC support). 

FWIW I'd like to test with "clang -O4" as well (this performs
link-time optimization), I've seen some speedup with other projects 
and this might help with CPython's speed as well.

Ronald



More information about the Python-Dev mailing list