Intel Compiler Compared To gcc
Screaming Lunatic writes "Here are some benchmarks comparing Intel's compiler and gcc on Linux. Gcc holds it own in a lot of cases. But Intel, not surprisingly, excels on their own hardware. With Intel offering a free (as in beer) non-commercial license for their compiler, how many people are using Intel's compiler on a regular basis?"
5 new front pages inside of like 20mins...
How together are these people if they deliberatly installed an SMP kernel on a uniproc machine. It may not affect the outcome that much, but I feel confused as to why they would install this OPTIONAL package for debian
So does this mean tha mozilla compiled with the intel compiler would run comparable to it's windows counterpart?
I would like to see a test with real desktop applications and desktops, ie. gcc GNOME/KDE vs. icc GNOME/KDE. Would these projects see significant performance improvements from the Intel compiler?
In looking at the selection of benchmarks, it seems like they're all based on scientific numeric problems. In other words, they're all very floating-point intensive. I'll admit that I didn't read it all that carefully, but it looked a bit like reporting SPECfp numbers without looking at SPECint.
Also, the benchmarks used are probably much more loop-oriented than much of the real-world code, but that's typical of benchmarks.
What I would find interesting would be to compile glibc, apache, and something like perl or mysql with both sets of compilers and see what difference you can get with some web server benchmarks. Or compile X and some game and see how the frame rate compares between the two compilers. Or compile X and Mozilla, and find some really complicated pages to see what gets rendered the fastest (possibly using some trick to get it to cycle between several such pages 1000 times).
I'm a little ignorant when it comes to this... gcc and linux have always gone hand in hand in my mind.
Could we see versions of linux distributed with intel compiler instead of gcc? Can the intel compiler compile the kernel?
Clue me in!
--noodles
I was just looking into this the other day--since Intel just supplies their own binaries, it wasn't thrilled about my Gentoo install. Sure, I had rpm, and I could use --nodeps to make it shut up during the install, but even then it didn't like my binaries. Maybe they're too new to be RedHat compatible? ...not to mention the silly license file I had to copy to get the thing to even attempt to install. Thanks, Intel, but no thanks. Until you open the source on this one, I see no need to test it out on my ATHLON. ;)
pb Reply or e-mail; don't vaguely moderate.
I am Pentium of Borg. Division is futile. You will be approximated.
a ^= b; b ^= a; a ^= b;
But Intel, not surprisingly, excels on their own hardware.
Do you mean to imply that Intel knows something about the Pentium architecture or instruction set that the authors of gcc don't? Does the code emitted from the Intel compiler use undocumented instructions? Intel's compiler is newer than gcc and wasn't developed with the "many eyes" that have looked at gcc over the years. It looks like Intel's engineers wrote a better compiler, simple as that.
These benchmarks give gcc a black eye, but I doubt Intel was using undocumented secrets of their chip to defeat gcc. Sometimes the open source community has to admit that not every open source project represents the state-of-the-art.
I've been writing some integer only video compression code, and these results don't really bear out what I've been seeing with GCC 3.1 and Intel C++ 6. I'm getting a consistent 15-20% more framerate under Intel, using an Athlon. An Athlon, god alone knows what we'd be looking at if I was daft enough to buy a P4. Admittedly there are some vectorizable loops in there (that are going to be replaced by primitives at some point), but even without those the performance improvement from C6 was consistent and noticeable.
More relevant is how the performance of C7 is markedly worse on the P3 platform than C6. Very disappointing, makes me wonder what they've done.
Dave
I write a blog now, you should be afraid.
You still have to get the license file and install it where necessary, but try an `emerge icc`. It does work (by doing pretty much exactly what you did by hand...). What I really want is the ability to put USE='icc' in make.conf.
Dan
i've been using icc on a realtime computer vision project that i'm working on. intel's compiler ended up giving me an approximately 30% boost over all --- a difference which is not to be sneezed at. in terms of empirical performance data for my application, icc wins hands down.
;-)
that said, icc does a lot of things that really irritate me. for one, it's diagnostic messages with -Wall are, well, 90% crap. note to intel: i don't care about temporaries being used when initializing std::strings from constants --- the compiler should be smart enough to do constructor eliding and quit bothering me. the command line arguments are somewhat cryptic, as are the error messages you get when you don't get the command line just right. the inter procedural optimization is very *very* nice; however, be prepared for *huge* temporary files if you're doing ipo across files (4+mb for a 20k source file adds up very quickly).
this all said, i don't think that i'm going to give up either compiler. gcc tends to be faster on the builds (especially with optimization turned on) and has diagnostics that are more meaningful to me. fortunately, my makefiles know how to deal with both
*seething* grrr.......not....funnny......grrrr
I wonder why he didn't turn on -fforce-addr under GCC?
Under the versions of GCC that I have used, I've always found that -fforce-addr -fforce-mem gives a slight speed boost when combined with -O3 -fomit-frame-pointer.
Under GCC 3.2, it looks like -fforce-mem is turned on at optimization -O2 and above, but -fforce-addr does not appear to be turned on, and it seems like it may be of some help in pointer heavy code.
I didn't use -fforce-addr because I didn't think of it! ;)
Based on some work suggested by someone in e-mail, I'm going to see if it's possible to write a "test every option combination" script. Given the hundreds of potential options, we're looking at a REALLY BIG test... ;)
In my view, gcc has far too many options and virtually no real documentation about how those options interact, or even what options go with what circumstances. Very messy, and very hard for people to figure out.
,I hope to alleviate that problem, given time and resources.
All about me
My article is a guideline, not a pronouncement. Your mileage is guaranteed to vary.
All about me
Historically, Intel has always been ahead of the competition in terms of code generation; I've used their Windows compiler for years as a replacement for Microsoft's less-than-stellar Visual C++.
On the Pentium III, the gcc and Intel C++ run neck-and-neck for the most part, reflecting the maturity of knowledge about that chip. The Pentium 4 is newer territory, and Intel has a decided edge in know how to get the most out of their hardware.
I have great faith in the gcc development team, and as my article clearly states:
All about me
Aarrrgggghhhhhh! I'd made that point in an earlier incarnation of the article, and it got lost when I rewrote the conclusions. Thanks for bringing this too my attention; I'll restore the lost text.
All about me
All about me
about the arrival of Intel compiler are:
(1) Competition. This is OSS versus a compiler from the largest CPU-maker, both designed to work on this CPU. I think quality will go high.
(2) Standards. Now that we have at least 2 worthy compilers, developers from both sides will try harder to stick to standards to be able to bite each others' markets. Intel's compiler will try to compile the linux kernel and glibc2 while GCC should make attempts at Borland and VC++ IDEs, possibly building on their MingW32.
If only AMD came out now with an open-source compiler for AthlonXP and Athlon64
"Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
What a bunch of lazy bastard whiners. (coming from a fellow whiner ;-)
The gcc code is available to all, and of course the committers will accept any real help. If you can make up the 15% difference, I'm sure you would get their complete attention!
Did you have any difficulty getting ICC to work on glibc-2.3? I had header file issues trying to install it on RH8, and IIRC, only glibc-2.2.5 is currently supported.
(blah, blah, lameness filter)
I've tried the SciMark2 test from the tarball on a PIII 1.4GHz with interesting results.
:-)
gcc -O3 -funroll-all-loops -fomit-frame-pointer -ffast-math -march=pentium3
-mfpmath=sse -malign-double -fstrict-aliasing -fforce-addr
icc -O3 -i_dynamic -xK -ipo
GCC-3.2.1 ICC7
Composite Score: 223.59 269.16
FFT Mflops: 167.72 161.51
SOR Mflops: 300.15 338.06
MonteCarlo: Mflops: 62.72 152.52
Sparse matmult Mflops: 251.10 282.48
LU Mflops: 336.29 411.24
Then I modified the Random.[ch] to inline the Random_nextDouble function in the Monte Carlo test:
MonteCarlo: Mflops: 107.81 189.71
[Without -fforce-addr, gcc give 122.]
Finally, I patched LU.c (lines 89-94)to use array multidimensional access instead of pointers.
This gave:
LU Mflops: 378.2 237.86
So GCC improved considerably, and ICC7 went to hell.
Composite Score: 247.61 241.69
GCC wins!
Bill Rugolsky
Why did SPEC dudes bother splitting between SPECint and SPECfp after all?
Because encryption and other heavy number theory doesn't use floating-point.
Because analog modeling of physical systems such as circuits doesn't use integers except as loop counters and pointers.
Because floating-point hardware draws a lot of power, forcing makers of handheld devices to omit the FPU.
Will I retire or break 10K?
Unfortunately, many of the optimization methods used by CPU vendors' compilers are patented with no available royalty-free license, precluding use of the methods in free software.
Will I retire or break 10K?
Yup yup. This is a reply by the root poster. Transexuals who will rule slashdot will be male to female transexuals. This is the majority group, and as such will rule slashdot.
There will be a lot of things to come in the future regarding slashdot and transexuals. Programs will be written, and spread through the file sharing systems. The programs will help spread the transgendered word.
People will be aware of another world of gender identity, and slashdot will be the root carrier of these messages.
Some people choose to surgically change their sex, others choose not to but live their lives as the xor of their born, genetic sex. Still others feel as if their gender identities switch back and forth from male to female from day to day, week to week or month to month, depending on their mood of the day.
We are a force many do not understand or are willing to understand. We will turn an innocent media icon into a tool of public education if me must.
You must be fearful of us, as will will rise and overcome.
Be patient with us as we only wish to be accepted by the majority population...
Intel has patents on certain algorithms used in icc. gcc won't use any patented algorithms. Everyone knows this. There is no "undocuments secrets" when it comes to the source code of a compiler.
MOJO. This is a link to a detailed report on how to handle unneccessary copying of temporaries and why the compiler can't do it for you.
Am I the only one who noticed the 20-50% file size increase of ICC versus GCC compiled programs?
On other architectures, gcc lags WAY behind the native compiler from the hardware vendor, look at sun workshop, compaq alpha compiler or sgi mipspro..
And the more code is made that only compiles with gcc, the more performance wastage on these architectures.
http://spamdecoy.net - free throwaway anonymous email - avoid spam!
I compiled mozilla with gcc 3.2.1 with "-O2 -fomit-frame-pointer -march=k6-2", but the performance is....
Anyway, I have entirely disappointed on mozilla and now it's only used to valid my html pages...
Where do you get "Troll" out of parent?
Why's everybody so "us versus them"?
Instead of saying "gcc sucks, icc rules" (or the opposite), how about we look at what optimizations icc does well, and add them to gcc (and/or vice versa).
Then something good comes out of this competition. A bunch of "<product X> sucks" replies doesn't do anybody any good.
Let me clarify a couple of popular misconceptions. Facts:
1) Intel compilers improve code performance (over GNU compliers) on both Intel (PIII and P4) and AMD (Athlon) processors due to supporting SSE and SSE2 instructions and other extensions. Although this perf gain will be greater on Intel cpus.
2) gcc maintainers have been unwilling to put Intel or AMD specific optimizations in the code -there's no secret instructions, just unwillingness to use the published stuff (check out the 100s of docs, forums and other stuff at developer.intel.com (where to get your non-commecial compiler downloads))
You know, Einstein once said his biggest mistake was naming his theory 'special relativity'
His theory is not that everything is 'relative', it is that if you specify all the variables, everything is precisely understood.
Moreover, it does not apply to anything else. How is it that you use the postulates of the constancy of the speed of light and of simultaniety, can be applied to the speed of ICC over GCC???
Quote from the article:
"Like Einstein, I have to say the answer is relative."
DOH!
Liberty.
[nt]
pb Reply or e-mail; don't vaguely moderate.