Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Intel C/C++ compiler vs. GNU gcc/MS Visual Studio 35

the_real_tigga writes "OpenMag features a benchmark review of the Intel C/C++ compiler as opposed to gcc on linux and Microsoft Visual Studio compiler on Windows XP. Not surprisingly (for me at least), icc beats them both, with dramatic performance improvements. Too bad they chose to review gcc version 2.95, and not the 3.x series, which is known to produce faster code. What is surprising, even AMD CPUs benefit from the icc-compiled code. There is another version of the article here, and they provide a download of the used tools , so you can try it at home too!"
This discussion has been archived. No new comments can be posted.

Intel C/C++ compiler vs. GNU gcc/MS Visual Studio

Comments Filter:
  • AMD (Score:3, Insightful)

    by fault0 ( 514452 ) on Wednesday January 29, 2003 @12:06PM (#5182306) Homepage Journal
    > What is surprising, even AMD CPUs benefit from the icc-compiled code.

    This isn't suprising, as AMD CPUs have always shown remarkable increases in performance with icc (sometimes even more than equivalent intel chips). I guess AMD does a really good job in making the Athlon a x86 chip.
    • Re:AMD (Score:5, Informative)

      by AT ( 21754 ) on Wednesday January 29, 2003 @01:13PM (#5182896)
      I'm guessing icc beats the others mainly on instruction scheduling. In other words, Intel has put a lot of effort into generating code that is parallelizable by spreading out close instructions to different pipelines.

      Since AMDs chips are pipelined, they are likely to benefit even if the pipelines aren't exactly the same.
  • kuch and associates (Score:4, Informative)

    by Satai ( 111172 ) on Wednesday January 29, 2003 @12:12PM (#5182359)
    It's actually Kuck and Associates that was acquired by Intel, not Kuch and Associates as listed in the article.
  • but wait (Score:2, Interesting)

    by Apreche ( 239272 )
    I have heard by word of mouth that the linux kernel depends upon bugs and quirks in gcc in order to compile and function correctly. I am not sure if this is absolutely true, but it's believable. If it is indeed true, then the linux kernel can't be compiled with the Intel compiler.

    However, if it is false, then I would very much like someone to provide me with instructions (I am not L33t) on how to re-compile the kernel with the intel compiler. If it gives that much of a performance increase, even on AMD cpus (I myself have a P3-450, roomate has athlon 1ghz) then I'm there.

    Anyone who says anything about it not being free as in speech can shut up now ^_^
    • Re:but wait (Score:4, Informative)

      by Anonymous Coward on Wednesday January 29, 2003 @01:27PM (#5183005)
      No, the intel compiler has been able to successfully compiler the kernel for the past two versions (7 & 6). Check out the recent discussion on the kernel mailing list
      http://www.uwsg.indiana.edu/hypermail/linux/ kernel /0301.2/0846.html
      Now we just need Spike ported from the alpha.
    • The Linux kernel was written using gcc extensions.

      I'm not going to say that gcc and the kernel sources are bug free, but writing a kernel requires making use of things that the standards have not specified or will not allow.

      For example, No C standard defines that a pointer should fit in some integer type, but the kernel needs to assume that on several places. In such cases, it's safe to expect that it fits in unsigned long and it does hold on all current Linux ports.

      Linux Kernel: [PATCH] fixes for building kernel using Intel compiler [insecure.org]
  • Really, we should have expected this. Look at MS and office. They do better integration with windows becuase they know their own os inside out.
    (Well.. so we hope ;)

    They make the processor and an AMD derivative, if you can consider the pentium processors that. I'd hope they'd know how to write a compiler.

    I'd also hope that sun can make better java technology and that ibm can write a better os for the AS/4000. Better == more integrated and done right in this case.

  • VC6.0, GCC2.95 (Score:5, Insightful)

    by spongman ( 182339 ) on Wednesday January 29, 2003 @12:55PM (#5182683)
    It would be nice to see the same comparisons but with compilers that aren't over 3 years old.
    • I still use VC++ 6.0 Pro for my development. Can't afford to upgrade, and the version I have works for my development needs.

      Plus I'm not in control of the gcc upgrades done on the dev server at the college, so I guess I shouldn't worry about that.
      • FYI: you should be able to download the latest Platform SDK from microsoft which includes the latest build tools. It doesn't have MFC/ATL, but you should be able to still use the versions from VC6 with the new compiler/linker.
        • Re:VC6.0, GCC2.95 (Score:3, Interesting)

          by RupW ( 515653 )
          FYI: you should be able to download the latest Platform SDK from microsoft which includes the latest build tools.

          Don't think so. There's the latest IA64 compiler, yes, but no IA32 compiler.

          It doesn't have MFC/ATL, but you should be able to still use the versions from VC6 with the new compiler/linker.

          I'd be surprised - they've changed the .pdb (debug info) format. That said, the interface for mspdb70.dll and mspdb60.dlls look roughly the same, so you might get away renaming dropping the 70 version into VS6.
  • beta of gcc 3.x? (Score:4, Insightful)

    by norwoodites ( 226775 ) <pinskia@BOHRgmail.com minus physicist> on Wednesday January 29, 2003 @01:10PM (#5182860) Journal
    They said gcc 3.x was beta software, it has more regression testing than windows have security testing.
  • by capoccia ( 312092 ) on Wednesday January 29, 2003 @01:15PM (#5182910) Journal
    Key Findings
    On Linux, numerically intense CPU performance improved by 47 percent compared to GNU C v2.95.
    On Windows, numerically intense CPU performance improved by 37 percent compared to MS Visual Studio.
    CPU performance for Intel on Linux and MS Visual Studio .NET on Windows was a dead heat.
    AMD Athlon-based systems benefited equally with Pentium III-based systems.

    GCC 2.95??? in 2003???
    what are these guys thinking? i mean, it may have been the compiler that came with the Suse 7.3 they were using, but still. Suse is on 8.1 now which does ship with gcc 3.2.
  • by TwistedKestrel ( 550054 ) <twistedkestrel@gmail.com> on Wednesday January 29, 2003 @01:24PM (#5182985) Journal
    I'm pretty sure that Visual .NET isn't beta software anymore, and neither is GCC 3.x ... this is somewhat out of date. However, somebody who wants a Slashdotting could just download the aforementioned tools and write their own up to date comparison ... (note that I don't want a ./ing)

    All things considered, though, I'm fairly sure GCC hasn't gotten quite *that fast* in the elapsed time since the article was written :p.
    • The orignal VC++.NET compiler has been out for awhile now. Actually, the *next* version of the VC++ complier is in beta, part of Visual Studio.NET 2003. It's supposta be very complient to ansi c++, when compaired to older versions, but I don't know if it's faster...

    • For $1,000? (Score:2, Informative)

      by yerricde ( 125198 )

      However, somebody who wants a Slashdotting could just download the aforementioned tools

      I'm sorry; I don't have $1,000 for any version of Microsoft Visual Studio.

      Oh, you mean the "standard edition" for $100? That's known to generate inefficient code; Microsoft doesn't even claim that the "standard edition" optimizes your code one bit.

  • re:

    Target specific object code and executable file format notwithstanding, what really makes the Intel compiler so very interesting is the fact that it delivers the same instruction sequences on both Linux and Windows platforms.

    Doesn't gcc also have the same property when running under Linux or windows? (for the OS-independant parts of your code, obviously)

    Although the main thrust of the article is to compare the new intel compiler to gcc and visual studio, they are also talking about comparing performance accross platforms - their initial comparison is gcc on Linux vs Visual Studio on Windows (no mention of what optimizations are performed, what other service are running, what nice levels the programs are executed at, whether they are measuring user cpu time or total execution time, and so on)

    It would be nice to see tests varying each of these variables individually, or showing all the possible combinations:

    • Operating System : Linux 2.4, Linux 2.5, Windows XP. I wouldn't expect the O.S. to have any impact on the performance of computationally heavy stuff that the compiler can affect (but would make a big difference when it comes to memory management, and any IO)
    • Compiler : Gcc, Intel C++, Visual Studio
    • Optimizations : no optimizations (should theoretically all be the same?), max optimizations without violating ANSI/IEEE rules, max optimizations not caring about rules (e.g. using -ffast-math for gcc), enabling or disabling different targets (ie compile for 386 against compile for 686). Maybe even anti-optimizations such as turning on some extra debug/profiling options under each compiler (the time taken to create and debug a program can be more important the time it takes to execute)

    On a (big) plus point - this article does at least show us some error margins on their measurements (none of this "Graphics card A lagged behind with a mere 47.6, but graphics card B stormed ahead with a score of 47.7" nonsense which seems to be all too common in most reviews)

  • For Gentoo users... (Score:3, Informative)

    by dotgod ( 567913 ) on Wednesday January 29, 2003 @02:44PM (#5183632)
    there's an ebuild if you want to try icc out. Just type:

    emerge dev-lang/icc

  • sloppy editor alert (Score:2, Informative)

    by Garen ( 246649 )
    This story is really old and no longer relevant. Wouldn't be surprised if it was a dupe of a several-year-old story thats already appeared on slop-dot.
  • by z01d ( 602442 )
    ......and Microsoft Visual Studio compiler on Windows XP. Not

    They changed the name from ".Net" to ".Not"? surprisingly (for me at least),
  • That that icc compile times are way (5x-6x) higher than the MS or GNU compilers... can anybody verify this?
    • I don't know about 5-6 times longer compile times, but ICC (7.0) takes considerably longer time to compile my projects than MSVC (7.0 aka .NET) does. I've never benchmarked them, but ICC sure is slow enough that I prefer MSVC for Windows development whenever I can stand working with the C++ subset supported by MSVC.
  • by Zeio ( 325157 ) on Wednesday January 29, 2003 @10:57PM (#5187024)
    GCC 3.2.x vs. Intel C++ 7 would have been interesting. This just isn't.

    Go here for GCC 3.2 vs. Intel 7 information:
    http://www.coyotegulch.com/reviews/intel_comp/inte l_gcc_bench2.html [coyotegulch.com]

    GCC has done quite a bit to catch up.
    • The article linked to in the parent post has quite a lot more interesting data in it than the main article (except for the lack of quoted error margins on the results)

      For most of those tests, the two compilers seem to show quite similar results, with one outperforming the other by only small margins of 10% or less (gcc has marginally better scores for the FFT routine on PIII and MazeBench, intel has slightly better scores for the Stepanov benchmark and LU decomposition for example). A few interesting differences do appear though that it would be nice to know more about:

      • The Intel compiler scores approximately 2.5 times as much as gcc 3.2.1 for the Monte-Carlo simulation, which is a considerably larger margin than for any of the other parts of the SciMark 2.0 benchmark
      • The executable size created for the MazeBench executable by the Intel compiler is around 3.5 times as large as that produced by gcc, wheras most of the other executables are within about 25%
      • g++'s output has more than a factor 17 performance difference in the OOPack Complex number benchmark on the P4 between its C and C++ implementations : all of the other tests have performance differences within a factor of 2 (with most having a negligible difference, some in favour of C, some in favour of C++)
    • http://216.239.53.100/search?q=cache:iS43iz-R2d0C: www.coyotegulch.com/reviews/intel_comp/intel_gcc_b ench2.html+coyotegulch+intel+gcc&hl=xx-bork&ie=UTF -8
  • by Davorama ( 11731 ) on Thursday January 30, 2003 @12:04AM (#5187359) Journal
    ... Intel has the nice compiler that generate really fast code. Presumably it's getting more done per CPU cycle on average by being smarter about scheduling and not wasting so many cycles.

    Intel also has this fancy new hyperthreading thing built into its newest CPUs that speeds things up by (very roughly speaking) letting one thread use another thread's wasted CPU cycles.

    Does a vastly more efficient compiler make hyperthreading ineffective? Is there some sort of balance that a really great compiler would need to strike between the fastest code and the code that will work best on Intel's fancy new CPU's if the app your are going to run is multi-threaded?

"The following is not for the weak of heart or Fundamentalists." -- Dave Barry

Working...