Quote:
Originally Posted by Muuss
if i had to make a choice among those 2, i would obviously go for gcc, simply because we're also running linux on Digital-Compaq servers and a few old sun workstations, all this with shared homes.
|
I agree that it is nice that gcc runs on all of these machines nowadays. OTOH, shared homes or otherwise, you're still going to have to recompile for each platform. Good code should strive to compile with icc or sun's cc or hp's cc or ... just as well as with gcc, IMHO. The biggest problem with switching compilers is usually related to linking with external libraries. Since icc can, from what I understand, produce code compatible with gcc's ld (or MS COFF and others), I don't think this is going to be a problem.
Quote:
Nobody would even accept to talk of the eventuality to modify their code each time they change of platform.
|
That's cool. Unfortunately, simply using gcc on all platforms isn't enough to satisfy that requirement (endianness, setenv(), and threads vs pthreads come to mind as examples of gcc behaving differently on sun than Linux).
Quote:
Before going for performance, we have to respect compatibilities.
|
That's cool. My suspicion, though, is that incongruities would have more to do with your code than your compiler.
Quote:
Just 2 questions tho, is icc able to produce some code that is compatible whatever your ix86 cpu is, ie P4 code working on a P2 for example ? And is P4 written source compilable on a P2 ?
|
I think that it is possible to use icc to write code for older x86 chips, if that is what you're asking. I am told that the performance benefits are still evidenced, perhaps due to more agressive memory alignment strategies. The compiler supports some optimizations, though, that are very chip specific. This is true for gcc and ms cl, too.