> My question boils down to this. Does gcc optimize code for the PPC? Or
> would I be better off with a Pentium machine?
The bottom line is that gcc is not a particularly good optimising
compiler, to say the least. I have no recent direct experience using it
on PPC architecture, but I can't imagine that it produces good output.
This assumption is based on the fact that the PPC is a risc
architecture, and on other risc architectures that I have experience
with (sparc, alpha and hppa), gcc is really pretty terrible when
compared with the native compilers. The problem here is that gcc is too
portable to be really efficient on any specific architecture.
Many years ago, I compared gcc to native compilers on IBM's POWER chips,
which were the predecessors to the PPC range, and it really wasn't able
to hold its own then. Perhaps it's changed since then, but I doubt it.
Your problem is probably going to become one of how much computation is
involved, how badly you want the results, how much effort you want to
put in to optimising the number crunching and whether you have money to
spend on the project. I've found for large scale projects (i.e. more
than just a couple of machines) that as far as bang per buck is
concerned, x86 architecture is the way to go: no question about it. If
you're content to use just one machine and you have existing equipment,
I'm not really so sure. Of course, this issue will depend on whether
your problems can be parallelised.
If you decide to go with x86 hardware + Linux, then I would encourage
you to dump gcc and install the Intel compilers for Linux. They are
It's possible that they are free for non-commercial use - I can't
remember. Certainly they have an evaluation license.
As far as speed is concerned, I've heard figures of 15% improvement
being mentioned. It certainly wouldn't surprise me if it were higher
for FP operations - which is another area where gcc is particularly
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!