This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C Compiler benchmark: gcc 4.6.3 vs. Intel v11 and others

On 1/19/2012 9:27 AM, wrote:
On 1/19/2012 2:59 AM, Richard Guenther wrote:
On Thu, Jan 19, 2012 at 7:37 AM, Marc Glisse<> wrote:
On Wed, 18 Jan 2012, wrote:

For those who might be interested, I've recently benchmarked gcc 4.6.3
(and 3.4.2) vs. Intel v11 and Microsoft (in Windows 7) here:

For the math functions, this is normally more a libc feature, so you
get very different results on different OS. Then again, by using
-ffast-math, you allow the math functions to return any random value,
so I
can think of ways to make it even faster ;-)
Also for math functions you can simply substitute the Intel compilers one
(GCC uses the Microsoft ones) by linking against libimf. You can also
use of their vectorized variants from GCC by specifying -mveclibabi=svml
and link against libimf (the GCC autovectorizer will then use the
from the Intel compiler math library). That makes a huge difference for
code using functions from math.h.


Marc Glisse
Thank you both for the tips. Are you certain that with the flags I used
Intel doesn't completely in-line the math2.h functions at the compile
stage? gcc? I take it to use libimf.a (legally) I would have to purchase
the Intel compiler?
In-line math functions, beyond what gcc does automatically (sqrt...) are possible only with x87 code; those aren't vectorizable nor remarkably fast, although quality can be made good (with care).

As Richard said, the icc svml library is the one supporting the fast vector math functions. There is also an arch-consistency version of svml (different internal function names) which is not as fast but may give more accurate results or avoid platform-dependent bugs.

Yes, the Intel library license makes restrictions on usage:

You might use it for personal purposes under terms of this linux license:

It isn't supported in the gcc context. Needless to say, I don't speak for my employer.....

-- Tim Prince

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]