[Python-Dev] Compiling Python with Intel compiler?

Michael Hoffman hoffman at ebi.ac.uk
Wed Jun 15 12:13:37 CEST 2005

On Tue, 14 Jun 2005, "Martin v. Löwis" wrote:

> Guido van Rossum wrote:
>> Intel has a free (as in beer) C compiler for Linux. A friend of mine
>> is involved in its production and marketing. He would like to see how
>> "his" compiler does on Python -- does it work at all, and is there a
>> speedup?
> There is a bug report on this compiler: python.org/sf/1162001
> There is also a patch, python.org/sf/1162023 which works around
> the bug. I don't like the work-around, because it assumes that the
> compiler binary is called "icc", however, it might be called just
> "cc" on some installations.

I submitted this bug, patch, and the c.l.p posting and thank Martin
for his help with them all. Martin's reservations on the workaround
are correct but I can't make more time right now to fix autoconf

To be honest, if icc were more gcc-compatible and returned an error
code for -OPT:Olimit=0, that would obviate the need for any patch to

I never published these results before but here's what I found in
terms of performance (full results available on request):

$ python pybench.py -s icc-python -c fedora-python | tail -n 4
             Average round time:    3677.00 ms              -15.95%

*) measured against: fedora-python (rounds=10, warp=20)

$ python pybench.py -s icc-xN-python -c fedora-python | tail -n 4
             Average round time:    3911.00 ms              -10.61%

*) measured against: fedora-python (rounds=10, warp=20)

fedora-python: Python 2.4/GCC 3.4.2 20041017 from python.org yum repository
icc-python: Python 2.4/icc (8.1) -pthread -fno-strict-aliasing -DNDEBUG -O3
icc-python-xN: Python2.4/icc (8.1) -pthread -fno-strict-aliasing -DNDEBUG -O3 -xN

Intel Pentium 4 2.66GHz; 512 KB cache; 507644 kB RAM; Linux 2.6.11-1.14_FC3

While a 16% speedup is nothing to sneeze at, I felt I wasted a lot of
time dealing with incompatibilities with extension modules and
libcprts.so, and so I no longer run it on my desktop. I do use it for
heavy computes on our compute farm when I'm not using extension modules.

> I think that if someone puts some time in this, they should get a
> free Intel T-shirt.

I'll accept a free Intel T-shirt if one is offered but I'll probably
pass it on to our long-suffering sysadmins who have spent even more
time dealing with icc, yet remain evangelists for it.

Since this was my first message to python-dev, I think the custom is
to introduce myself. I'm a PhD student at the University of Cambridge
studying computational biology. I've been using Python for the last
three years and have loved almost every minute of it. I've written
sequence alignment algorithms in Pyrex, glue to genome database APIs
in Jython, and a whole lot of other stuff using CPython. We run Python
on a 1145-CPU compute farm that consists of Alpha/Tru64 and
Intel/Linux boxes.
Michael Hoffman <hoffman at ebi.ac.uk>
European Bioinformatics Institute

More information about the Python-Dev mailing list