IBM Releases Compiler for Power4 and G5
davids-world.com writes "IBM offers its optimized XLC compiler not just for Intel CPUs, but also for its own G5 processor (article in German at Heise). Unlike gcc, it is optimized for the G5 and achieves a major boost in speed, as first results show. I guess we will have to compare the new benchmark data (once available) with the data we get with the optimized Intel compiler for Xeon. The compiler is available for download now."
So will this new compiler speed up the process of porting Duke Nukem Forever to the Mac?
Slashdotter are stupid and biased.
Lest anyone forget, Apple beat Intel in real world benchmarks... so the PC fanboys cried that SPEC benchmarks are the real measurement to gague speed... (probably because the comparisons were much closer when conducted this way). When SPEC benchmarks were displayed, these same fanboys cried that Intel's compiler wasn't used (instead the same compiler between platforms). Apple replied that its fairer to normalize the compiler between platforms and that while Intel could have achieved higher results when their compiler was used, Apple could do the same. So, here is that compiler. When/if the G5 outperforms Intel's best, what will the fanboys rally cry be next?
This is a preview beta. What will the final product be released under?
>So will this new compiler speed up the process of porting Duke Nukem Forever to the Mac?
Sorry to burst your bobble, but there's a reason why the game name's Duke Nukem *Forever*. That's the amount of time it will take to make it.
And is there a particular reason why IBM couldn't apply their work towards gcc? So much for the whole open-source, contribute-to-the-community philosophy.
Maybe they just didn't feel like it. Maybe they just preferred working with their own code. IBM's contributed, a lot, it doesn't mean that they're now servants of the open source community.
I, for one, welcome our new IBM overlords.
Ok, now that's out of the way, let's get back to real comments.
Believe it or not, people DO sometimes run singular tasks on hardware which they want highly optimized...and believe it or not, you can actually install more than one compiler on your system at a time(yes, I know, amazing!)
Please help metamoderate.
IBM has contributed more to the open source community than I would venture to guess any other corporation on earth. (think of the code, projects, money, support, etc). I would not be so quick to blast them for not doing everything under an open source license. Encourage yes, but let's be civil about this. IBM is not just blowing smoke about OSS, they have put their money, time, and products where their mouth is.
Finkployd
Xcode, the new compiler/IDE, which is based on gcc, is also optimized for the G5.
For more information, see Apple's Xcode site.
-- Fighting mediocrity one bad post at a time.
Why can't they just give them away for free?
Ñ'
Why would they use GCC as a base? It's not intended to compile over a wide range of platforms, just the pSeries processors (which includes the G5), so it's not like they need to be able to port it to x86. When you code a compiler for one fixed architecture you can (and almost always do) end up with HUGE speed increases, since you get to exploit all the fun capabilities of a chip without having to worry about compatibilty.
Put simply, IBM wasn't that interested in improving the cross-platform GCC this time. They were interested in improving a number of their OWN compilers (not just C/C++, Fortran too!) for their OWN architecture.
GCC's whole purpose is to be the most portable compiler possible, not the best performing on any particular architecture.
XLC has a different set of design goals, and the internal architecture of the the compiler is different enough from GCC that there wouldn't be much point in trying to graft them together.
-jcr
The only title of honor that a tyrant can grant is "Enemy of the State."
Type of Code G4 G5
Scalar +70% +210%
Vector +40% +70%
If this holds that places his 2.0GHz G5 (single)=254 at 787
Having used the xLC compiler (on AIX 4 and 5), I can say that it is a very nice compiler. It's probably one of the most strict ANSI-compliant compilers I've used. It also has some nice architecture tuning optimizations. If this new version speeds up the G5, then you can count on future versions giving even better increases.
This is very good news for Apple-people.
Maybe because the optimizations require a view of the G5 that does not work with the generic view that GCC has of a processor. IBM tried to submit GCC patches but they were rejected because the GCC team did not like how deeply they affected the GCC core. GCC is THE cross platform compiler, the PPC 970 is enough different from the assumptions it makes that it will not produce optimal code without structural changes and the team doesn't want to do that.
There are 4 boxes to use in the defense of liberty: soap, ballot, jury, ammo. Use in that order. Starting now.
It is good to see IBM ending the habit of charging extra for the C compiler. AIX hasn't bundled the compiler since 3.2.5.
The top 5 questions/posts from slashdotters:
1) Is it open source, I didn't RtFA?
2) Why isn't it open source?
3) Will they release it for Linux on the ppc?
4) What does this have to do with SCO?
5) Apple is dead and these are flawed stats flamewar.
I'm too lazy to come up with a sig that is good enough to be the same everytime, so you can just read this instead. You can try and rid your braincells of this text, but it's pretty much stuck there now.
And is there a particular reason why IBM couldn't apply their work towards gcc?
Yes.
GCC rejected alot of their patches. GCC is a cross paltform compiler, the maintainers can be very picky about adding code that only helps one platform.
IBM has contributed quite a bit to GCC, but GCC is not the proper place for a heavily optimised platform-specific compiler effort.
"The worst tyrannies were the ones where a governance required its own logic on every embedded node." - Vernor Vinge
Um, that's the point. IBM cooks up code to make the G5 look as fast as possible. Intel cooks up code to make the Xeon looks as fast as possible. Now compare. Fastest code/chip against the competition's fastest code/chip. The complaint in the past was that it was always the fastest code/chip of one side against a non-optimized code on the other side. Now we can have a fair shootout.
-T
And is there a particular reason why IBM couldn't apply their work towards gcc? So much for the whole open-source, contribute-to-the-community philosophy.
First off, most companies develop compilers for their hardware/software because they have the behind-the-scenes knowledge necessary to produce a superior product, and therefore, make money off of it. It's called having a competitive advantage, and I see nothing wrong with that.
Second, who says that they won't eventually work to get these performance enhancements included into a future release of GCC? Just because they haven't done so yet does not mean that they never will.
Rule #1 -- Politics always trumps technology.
I know everyone wants to know why they did not just contribute to GCC, but seriously people, I imagine they have their reasons.
Perhaps they wanted something done in a timly manner without waiting for the GCC people to accept their patches. Perhaps they felt a more elegant solution could be achieved by building their own compiler from scratch. Maybe they think GCC is a piece of crap (which for high performance computing, it is).
Just because IBM support open source does not mean they are obligated to do everything for the sole purpose of advancing the movement.
Finkployd
I wonder how the AltiVec support in XLC for OSX compares to that in GCC?
This is actually really important. One of the big reasons that the Intel C compiler spanks every other available x86 compiler is that its SSE/SIMD support is, in the words of one of my assembly-programmer friends, "awe-inspiring." Like, unrolling entire program loops and replacing them with single SIMD instructions.
As far as I know, pretty much all of the AltiVec/VMX support in GCC was contributed by Apple and Motorola, and prior to the ppc970, IBM has never produced a PPC CPU with AltiVec instructions, so prior versions of XLC have never had to support it. So I'll be really curious to hear how it stacks up against GCC's Altivec.
News for Nerds. Stuff that Matters? Like hell.
(Disclaimer: I used to work for IBM Research. This is not inside info.)
The XL line of compilers has a long and glorious tradition. What matters most here is compatibility with existing code. IBM doesn't optimize XLC so you could get a faster kernel, it optimizes XLC so they could recompile DB/2 on AIX and get faster results; and also, obviously, for many of their other products. Another consideration is those clients that have a large codebase used with XLC.
The world of C/C++ is rather sad in that code is not only non-cross-platform in most cases, it is also commonly unlikely to compile using a different compiler on the same platform. Moving from XLC to gcc would mean throwing away an investment of decades in the compiler, not to mention the huge amount of work required to port the source code of products such as DB/2. So IBM helps gcc, and also invests in XLC. There's no conflict here. I would not be surprised if many of the various optimizations employed by XLC will eventually find their way to gcc -- by the very same IBM researchers.
BTW, talking of optimizations, people in IBM Haifa have developed an amazing post-compile optimization tool
. Now, seeing an open-source version of that would be cool. Not very likely, though, since this is the source for some of the performance edge DB/2 has over its competitors.- Tal Cohen
If the parent or grandparent had glanced at the PDF, they too would have noticed that GCC compatibility was one of the major points covered. There are a few pages devoted to what currently is compatible with GCC as well as what's planned. My bet is that they've had their own optimized compiler around since they first fab-ed one of these, to use for test purposes.
It would be foolish to scrap all of the work they'd already done, as well as the performance achieved (double the performance of GCC in some cases, from the PDF). There is mention of this compiler supporting SuSe Enterprise Edition however, but not enough detail to tell if it can compile SuSe or just compile *on* SuSe.
If there is a plan to integrate stuff from this compiler into GCC, my guess is that GCC compatibility would be the first step. It would be very difficult to try to integrate the two if they have fundamentally different structures and no common ground to speak of, not to mention that fact that chip manufacturers invariably keep the true capabilities of their hardware more or less secret until launch time, and putting code into GCC from the beginning may tip their hand to others before they're ready to do so.
obDisclaimer: IANACompilerGuru
Plus, the team working on this compiler would probably take several man-decades---if ever---to become as fluent and comfortable with gcc as they are with their own code.
(Disclaimer: I work for IBM. In fact, I work on a compiler for IBM, though it's neither this compiler nor gcc. My opinions don't reflect those of IBM.)
Patrick Doyle
I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
I'll hit preview this time instead of just blindly clicking. Sorry bout that.
Do your homework. Apple modified the tests to reflect the actual shipping models, since they were running on prototype G5's. These issues have long been put to rest and Apple just updated their results the other day with actual shipping G5's. Get out of denial, x8 is not a religion, it's a processor for goodness sake.
I wonder why folks modded you insightful here. The cynic in me says they missed the sarcasm you laid down pretty thick and thought they should really get laptops for free.
Norris/Palin 2012
Fact: We deserve leaders who can kick your ass and field dress your carcass.
Is the word "fanboy" used by anyone but fanboys?
Eh, I wouldn't say that GCC is "worthless", it's just that its worth lies in an area that has nothing to do with high-performance computing. Or even mid-performance computing. :)
GCC's primary virtue is that it exists. For practically every computing platform on the planet, there's a famliar, stable toolchain that produces repeatable results. You can't optimize a program that doesn't exist in the first place, and GCC is the tool that's allowed many if not most of the programs we use on a daily basis to exist. There's value in that.
News for Nerds. Stuff that Matters? Like hell.
The IBM compiler dis some wild instruction reordering which made the optimized compiled code really hard to understand, but somehow better fitted to the processor's pipeline structure. Fortunately the only thing that broke when I turned on the optimizer was the "marching ants" used for selection, and that was the result of some way-too-fancy-casting of Pattern pointers that fooled the optimizer. I suspect the IBM compilers will continue to reign if performance is the goal.
No, I don't mean scientific computing. I mean high performance computing. SP clusters, Linux clusters, weather modeling, the stuff that large universities do. No offense but where I am we run significantly larger clusters than SARA has ever seen.
GCC is a great compiler, I use it daily. Better than Intel and IBM for performance (expecially FORTRAN) it is NOT. It was designed as a cross compiler and in that it shines. But it is not all things to all people.
I certainly did not flame GCC and all the people who work on it, come back down off your high horse. All I did was list some reasons why IBM may not have used GCC, one of which is that most of the HPC people I know and work with have tested it and found it to be unacceptable for what they do.
That said, I certainly can see a day when GCC IS the best performing compiler, hands down. I believe open source will eventually overtake most commercial applications due to the momentium it currently has. However it would be silly of me to say that MySQL is better than Oracle, when it clearly is not (yet).
Finkployd
The speed could be infinite. IBMs new complier is powered by rainbows, dreams, wishes, magic gumdrop sprinkles, and imagination. Theoretically speaking, you could bypass the rainbows, dreams, and wishes; while using a wrapper to off-load the burden of the magic gumdrop sprinkles to the flux capacitor. Then you could primarily focus your development on imagination... which would allow you to compile and run applications at a speed predetermined by your imagination.
I've also heard that the wishes and dreams can be fairly powerful tools as well. However, results may vary due to unfulfilled wishes and crushed dreams.
"Things are more moderner than before- bigger, and yet smaller- it's computers-- San Dimas High School football RULES!"
IOW, the PC fanboys are just going to claim that SPEC was "developed natively for the mac".
Lars T.
To the guy who modded me down from perfect to terrible Karma - Apple haters still suck
If you knew about the SPECcpu2000 suite, you'd know that every program comes with a corresponding "correct" output file against which the output must be checked. To report a SPEC result, the output has to WORK.
Yes, and the output probably would work, too, if you enabled the same optimizations in gcc. That doesn't make the optimizations "semantics preserving".
For example, gcc doesn't use x86 transcendental instructions by default because they give wrong results for large arguments. Most programs never encounter that case for most input data, but the program has different semantics and the optimization is not semantics preserving. The fact that those changes only show up under rare circumstances makes the problem worse.
May I humbly suggested that you stop using the word 'semantics', at least if you don't know the meaning of the word, which you don't seem to.
Yes, you should be quite humble because you erroneously think that "I ran the program and it gave the same answer" means that the compiler compiled it correctly.
Interesting to note that Objective C is much closer to raw C than C++, and as such yes. You can do some stuff with it that's worthwhile.
Also note that David Stes released his POC, which is an Objective-C->C compiler with a runtime he uses (actually it's a bit more than Objective-C) to run ObjC code today.
Apple will probably use this new compiler to recompile their CoreFoundation stuff, which is all C stuff that Carbon and Cocoa tap into. So, a simple recompile of CoreFoundation should net good speed improvements on G4s and MUCH better results on a G5.
So even if IBM chooses not to directly support Objective-C, Apple can still benefit in the short term while they rustle up their very own ObjC->C system (which is NOT a very challenging feat, considering the ObjC runtime is a relatively simple-to-use C library).
Slashdot. It's Not For Common Sense
If I go from Mac to Intel, or vice versa, and I'm not the type to pirate everything from friends, warez sources, or p2p, then I have to buy (prices from Amazon.com, rounded to nearest dollar)...
So the cost to switch is:
To Mac from Win: hardware + 1883 software
To Win from Mac: hardware + 1857 software
And that's just the basics for a good multimedia development set-up. If you code, create Flash/Shockwave, etc., then you can add on another $500-1000 for other tools... or more.
Bundles and other incentives can bring it down, but this is not an inconsequential cost. Even if you could get a 10% faster PC for the same price as a Mac, or a 10% faster Mac for the same price as a PC, you have to ask yourself how much that 10% is really worth to you.
How often will you utilize all the capabilities of the machine and stretch the system past the capabilities of the alternative? How many hours of labor will the system save you over time?
And when all is said and done, you can scream over benchmarks and which is the better OS all you like. But they're totally meaningless.
(Mac fans can claim Windows has an inherently higher TCO, but let's face it, that's if the user is someone who thinks GNU is a Milton Bradley game that succeeded Gnip-Gnop. The rest of us know that a well-educated Windows user can avoid many of its pitfalls.)
Each time I've upgraded my hardware, there's one question I ask when I consider whether to switch platforms... What's the bottom line? How much more would this cost or save?
When I worked it out in 1993, a 486 DX2/50 by mail-order beat an education priced Quadra 40 from the university. Since then, I've invested much more in software that I had as a student... Even though the hardware costs are becoming less of a factor, the software costs have become more of a factor to compensate.
If I won the lottery, I'd buy a Mac and all the cool software I wanted. But barring that, I'll be looking carefully at Prescott versus Athlon 64 in the coming months, and making my choice in the Wintel world because that's where my software is.
So, though this compiler news is cool if you're a Mac User, because it makes your platform better *for you*, the arguments about whether Mac beats WinTel are a lot of sound and fury, signifying nothing.
Start a happiness pandemic
Can't we talk about Macs on Slashdot without having to talk about whether they're overpriced or slow or whatever? I have a Mac, I like it, I use it for lots of things. I'd like to be able to discuss it, rather than just read x86 users' posts about how much better their platform is & why. This article is about a complier, not comparison shopping. Could we stick to that please??
All the PowerPC processors are binary compatible. Even the Power series from the Power2 forward to the Power5. The beauty of the PPC architecture, is that the physical implementation can be radically different, but the instruction set remains the same. (For the most part, the PowerPC ISA is still revised to it keep modern.)
What is different is the performance you may get when targeting a processor. The compiler can optimize your code to a particular processors physical implementation. For example, code compiled for the G5 will be structured to work better knowing how the G5 processes instructions down its pipeline, how it makes its decisions, caching, etc. But the 32-bit code will still work on a G4 albeit at a slower rate.
IBM is in the best position to understand the physical design of the G5 and thus they can make sure that when compiling code, the compiler chooses and structures the instructions that will run optimally for it. In addition, IBM is pretty advanced in developing optimization techniques and they bring a lot of intellectual property to the table. All this makes for some pretty serious optimizations that rival anything a more generalized compiler may be able to do.
What this means is that the Mac developer has another weapon in his arsenal for conquering performance issues. Consider it a free upgrade for your processor, the results are showing significant improvements that will work there way into OS X and performance sensitive Apps.