[Numpy-discussion] Should I use pip install numpy in linux?

Nathaniel Smith njs at pobox.com
Fri Jan 8 22:38:19 EST 2016


On Fri, Jan 8, 2016 at 7:17 PM, Nathan Goldbaum <nathan12343 at gmail.com> wrote:
> Doesn't building on CentOS 5 also mean using a quite old version of gcc?

Yes. IIRC CentOS 5 ships with gcc 4.4, and you can bump that up to gcc
4.8 by using the Redhat Developer Toolset release (which is gcc +
special backport libraries to let it generate RHEL5/CentOS5-compatible
binaries). (I might have one or both of those version numbers slightly
wrong.)

> I've never tested this, but I've seen claims on the anaconda mailing list of
> ~25% slowdowns compared to building from source or using system packages,
> which was attributed to building using an older gcc that doesn't optimize as
> well as newer versions.

I'd be very surprised if that were a 25% slowdown in general, as
opposed to a 25% slowdown on some particular inner loop that happened
to neatly match some new feature in a new gcc (e.g. something where
the new autovectorizer kicked in). But yeah, in general this is just
an inevitable trade-off when it comes to distributing binaries: you're
always going to pay some penalty for achieving broad compatibility as
compared to artisanally hand-tuned binaries specialized for your
machine's exact OS version, processor, etc. Not much to be done,
really. At some point the baseline for compatibility will switch to
"compile everything on CentOS 6", and that will be better but it will
still be worse than binaries that target CentOS 7, and so on and so
forth.

-n

-- 
Nathaniel J. Smith -- http://vorpus.org



More information about the NumPy-Discussion mailing list