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

 



Forgot your password?
typodupeerror
×
Technology (Apple) Businesses Apple Technology Hardware

IBM Releases Compiler for Power4 and G5 471

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."
This discussion has been archived. No new comments can be posted.

IBM Releases Compiler for Power4 and G5

Comments Filter:
  • All right! (Score:4, Funny)

    by Prince_Ali ( 614163 ) on Thursday August 28, 2003 @02:18PM (#6817004) Journal
    So will this new compiler speed up the process of porting Duke Nukem Forever to the Mac?
    • by Anonymous Coward on Thursday August 28, 2003 @02:23PM (#6817055)
      >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.

    • by Lxy ( 80823 ) on Thursday August 28, 2003 @02:27PM (#6817096) Journal
      Yes, it compiles vaporware in half the time.
  • Here we go again: (Score:5, Insightful)

    by Anonymous Coward on Thursday August 28, 2003 @02:22PM (#6817042)
    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?
    • ...what will the fanboys rally cry be next?

      That bandwidth doesn't really matter, only MHz? I don't see PCs beating the interconnects present in the newest Macs for a while.
      • AMD's Hypertransport is basically (exactly?) the same thing. For the same reason, SMP on x86-64 is very efficient. So we might see an increase in SMP desktops for the PC architecture, in the same way that Apple has been pushing them.
        • Re:Here we go again: (Score:5, Informative)

          by x136 ( 513282 ) on Thursday August 28, 2003 @03:39PM (#6817946) Homepage
          AMD's Hypertransport is basically (exactly?) the same thing.
          Calling it "AMD's HyperTransport" isn't quite accurate. AMD is part of the HyperTransport executive committee, however. From The HyperTransport Consortium's About Us [hypertransport.org] page:
          Advanced Micro Devices, Alliance Semiconductors, Apple Computers, Broadcom Corporation, Cisco Systems, NVIDIA, PMC-Sierra, Sun Microsystems, and Transmeta are charter members and comprise the Executive Committee of the HyperTransport Technology Consortium.
          That said, Apple does make use of HyperTransport technology in the Power Mac G5, as is stated on the Architecture [apple.com] page of the G5 site:
          ...as well as the HyperTransport interface that connects the PCI-X controller and the I/O subsystems to the system controller...
    • Let's be objective (Score:3, Insightful)

      by siskbc ( 598067 )
      Lest anyone forget, Apple beat Intel in real world benchmarks

      What's a "real-world" benchmark? Comparing the function of photoshop on mac vs. pc, when it's developed natively for the mac? That's not really fair. It's simply not the same code. We could take any of the many programs made natively on PC (which are then ported to mac) and do the same trick.

      so the PC fanboys cried that SPEC benchmarks are the real measurement to gague speed... (probably because the comparisons were much closer when conduc

      • by stingerman101 ( 702479 ) on Thursday August 28, 2003 @02:54PM (#6817377)
        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.
      • by Lars T. ( 470328 ) <Lars...Traeger@@@googlemail...com> on Thursday August 28, 2003 @03:42PM (#6817983) Journal
        IOW, the PC fanboys are just going to claim that SPEC was "developed natively for the mac".
    • Since OS X.x has BSD underpinnings, why not just compile it on x86?
      Running OS X.x with MS Orifice seems like the sweet spot for stable OS/file format compatibility in the proprietary world...
    • by stratjakt ( 596332 ) on Thursday August 28, 2003 @02:41PM (#6817245) Journal
      When/if the G5 outperforms Intel's best, what will the fanboys rally cry be next?

      I nominate "who gives a shit?"

      Anyone who buys a PC because of lame ass benchmarks has no use for said PC, other than to yammer endlessly. If you work with macs, get a mac, if you work with PCs, get a PC, they're two completely different worlds.

      I'm sick of X is 30% better at [specific instruction] than Y arguments. It's like "xbox is 33% faster than ps2" or "mac is 21% faster than dell!". Who gives a flying fuck anymore? Xbox has the worlds shittiest lineup of games, and Macs dont run a *lot* of software essential to people.

      They're just devices, a means to an end. Quit telling me how your boot polisher is better than my doorstop. Its irrelevant.
      • by swillden ( 191260 ) *

        Anyone who buys a PC because of lame ass benchmarks has no use for said PC, other than to yammer endlessly. If you work with macs, get a mac, if you work with PCs, get a PC, they're two completely different worlds.

        This isn't true for Linux users. I run Debian Linux, so my world is almost exactly the same across x86, PowerPC, Alpha and a whole bunch of other platforms. So, for me, these arguments about relative performance and relative cost *do* matter. At the moment I don't think there's much question

    • When/if the G5 outperforms Intel's best, what will the fanboys rally cry be next?

      It'll be the tried and true rally: Apple sucks!!
    • A Question (Score:5, Funny)

      by 1000StonedMonkeys ( 593519 ) on Thursday August 28, 2003 @03:02PM (#6817451)
      Is the word "fanboy" used by anyone but fanboys?
  • by burgburgburg ( 574866 ) <splisken06&email,com> on Thursday August 28, 2003 @02:22PM (#6817048)
    This is a preview beta. What will the final product be released under?
  • IBM G5 (Score:3, Funny)

    by Anonymous Coward on Thursday August 28, 2003 @02:26PM (#6817088)
    I, for one, welcome our new IBM overlords.

    Ok, now that's out of the way, let's get back to real comments.

  • According to " Apple issues G5 benchmarks [theregister.co.uk]", the SPEC [spec.org] results generated by GCC for the G5 do not give it a significant performance advantage over Pentium-based workstations. The G5 scores 840 and 800 on SPECfp and SPECint, respectively, and the Pentium machine scores 693 and 836.

    The new IBM compiler should rectify the situation. Apple will not need to manipulate the SPEC scores by hiding behind the GCC compiler. In the past, Apple stuck with the GCC compiler because it causes the Pentium to perform much

    • The Pentium scores you listed are from Pentium CPU's (not the xeons which did slightly higher) which are incapable of dual cpu operation. This was against a dual cpu system that was probably optimized well for dual use.

      Whats interesting to note that the single pentium machine scored 836 in int performance and the xeons (dual machines) scored 840... Almost no performance increase from going dual here.
  • What about Xcode? (Score:4, Interesting)

    by jared_hanson ( 514797 ) on Thursday August 28, 2003 @02:30PM (#6817124) Homepage Journal
    Xcode, the new compiler/IDE, which is based on gcc, is also optimized for the G5.

    For more information, see Apple's Xcode site [apple.com].
  • Experience with xLC (Score:4, Informative)

    by cK-Gunslinger ( 443452 ) on Thursday August 28, 2003 @02:32PM (#6817161) Journal
    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.
  • Questions. (Score:5, Interesting)

    by emil ( 695 ) on Thursday August 28, 2003 @02:33PM (#6817170)
    1. Can this compiler be used on any open-source unix-like kernels? I know that Linux has some hooks into gcc.
    2. Can this compiler be used to prepare glibc or any other major C libraries?
    3. Can this compiler be used to generate native Mac OS X GUI applications (cocoa)?
    4. Will the source be released?

    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.

    • Who said they were giving it away for free? This is a preview beta download. I suspect it'll be expensive when finally released.

      But it would be nice if they learned a lesson from intel and just gave it away.

    • Re:Questions. (Score:5, Informative)

      by Wesley Felter ( 138342 ) <wesley@felter.org> on Thursday August 28, 2003 @03:18PM (#6817674) Homepage
      Can this compiler be used to prepare glibc or any other major C libraries?

      I'm sure xlc is used to compile AIX libc.

      Can this compiler be used to generate native Mac OS X GUI applications (cocoa)?

      No, it's not an Objective-C compiler.

      Will the source be released?

      No.
  • by fuqqer ( 545069 ) on Thursday August 28, 2003 @02:33PM (#6817175) Homepage
    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.
  • Comment removed (Score:5, Insightful)

    by account_deleted ( 4530225 ) on Thursday August 28, 2003 @02:36PM (#6817203)
    Comment removed based on user account deletion
  • Interesting, but... (Score:5, Interesting)

    by Doktor Memory ( 237313 ) on Thursday August 28, 2003 @02:40PM (#6817232) Journal
    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.
    • by sockit2me9000 ( 589601 ) * on Thursday August 28, 2003 @02:46PM (#6817300)
      I read that there is a fairly large difference between the size of a gcc compiled instruction set (100k) and the XLC compiled instruction set of the same origin (700k). Presumably they are doing some pretty impressive unrolling and inlining. I got that at this dicussion here [infopop.net].
    • by WasterDave ( 20047 ) <davep@noSPAm.zedkep.com> on Thursday August 28, 2003 @04:05PM (#6818253)
      the Intel C compiler spanks every other available x86 compiler

      It used to, but it's a close call these days.

      SSE/SIMD support is, in the words of one of my assembly-programmer friends, "awe-inspiring."

      No it's not, it's fucking awful. Sure, the hype is good, the docs (which are actually very good) show a loop being unrolled to some SIMD instructions, including a little cleanup at the end in scalar instructions. You code it up, it goes ... you point it at some real code, nothing happens. Why is this?

      It's not magic, that's why. You put an exit condition in the loop, you break vectorising. If everything isn't lined up on nice 16 (?) byte boundaries, you break vectorising. Once you've gone through making sure all the conditions are met you realise that it's easier just to use the intrinsics in the first place.

      Intrinsics, BTW, are very cool and much easier to code than you would have thought. GCC has them too :)

      Dave
    • by PCM2 ( 4486 )

      I wonder how the AltiVec support in XLC for OSX compares to that in GCC?

      My understanding was that GCC did little to nothing in the way of AltiVec optimization of "straight" C code. You have to write the AltiVec instructions yourself. The cool thing about AltiVec is that you don't have to write the vector code in assembly, you can do it in C. But still, it's not like you can (for example) flip on the AltiVec support in GCC, compile LAME, and have an AltiVec-enabled MP3 encoder. Somebody still has to come

  • It looks really good.

    Does it support Obj C though?
    Can it compile Cocoa code?
  • by TheTranceFan ( 444476 ) on Thursday August 28, 2003 @03:15PM (#6817623) Homepage
    I personally ported Macintosh Adobe Premiere 4.0 from 68000 to PowerPC. This was right when the PowerPC-based Macs were introduced (before, actually, since Apple was providing us with prerelease product). At that time, Apple's internal C compiler (then MrC) wasn't ready for primetime, nor was ThinkC. We'd been using MPW for the development, but the only good compiler for PowerPC was IBM's compiler. So I edited/built/linked the whole thing over the network on an RS/6000(?) somewhere at Adobe. I remember when I turned the optimizer on, Premiere got twice as fast, just like that.

    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.

  • bad benchmarks (Score:3, Interesting)

    by penguin7of9 ( 697383 ) on Thursday August 28, 2003 @04:04PM (#6818231)
    IBM's benchmarks comparing gcc and xlc on SPECint2000 and SPECfp2000 seem not very meaningful to me. First of all, note that both -O2 and -O3 are semantics preserving in gcc, while -O4 and -O5 in xlc are not. That is, in particular on the SPECint2000 benchmarks, the xlc compiler is faster simply because it changes the behavior of your program. The same may even be true for xlc compiling SPECfp2000 at lower optimization settings; the Intel compiler on P4, for example, achieves large gains in performance on some benchmarks by inlining math functions that gcc uses a library for--because the P4 instructions aren't quite right.

    In my experience, you can usually match the performance of those other "fast" compilers with gcc by using the "-f" and "-m" flags. The main difference is that gcc forces you to be explicit about which semantic changes the compiler is allowed to make, rather than lumping things together under some generic "-O5" setting. That's a good thing.

    (Note that my comments apply to gcc; g77 may well be a much worse performer than commercial Fortran compilers even though it shares the same back-end with gcc. That affects the SPECfp2000 scores. Fortran just doesn't seem to be a high priority for gcc.)
  • Speed is Irrelevant (Score:4, Informative)

    by gbulmash ( 688770 ) <semi_famous&yahoo,com> on Thursday August 28, 2003 @06:25PM (#6819606) Homepage Journal
    We can talk specs all you want, but most multimedia pros who are running OsX or Windows have invested more in software than hardware. And that's where all the talk of speed breaks down.

    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)...

    • Ms Office Standard (Win: 347 / Mac: 357)
    • Photoshop (Win: 580 / Mac: 590)
    • Illustrator (Win: 390 / Mac: 403)
    • Premiere 6.5 (Win: 540 / Mac: 533)

    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.

    • by noewun ( 591275 )

      most multimedia pros who are running . . . Windows

      Both those guys must be pissed!

      I know, I know, but I couldn't resist. . .

      How often will you utilize all the capabilities of the machine and stretch the system past the capabilities of the alternative?

      If you are doing serious Photoshop or After Effects work, all the time. No matter how fast the newest machine is, there's an art director out there with a layout which will make the machine choke.

  • xCode? CodeWarrior? (Score:3, Interesting)

    by MacGod ( 320762 ) on Thursday August 28, 2003 @07:05PM (#6819905)
    What I wonder is whether this compiler will be used in future versions of xCode. If it is, in fact, significantly faster than GCC, it seems logical that Apple would wants it as part of their own developer tools.

    In addition, I wonder what this will do for Metroworks' CodeWarrior compiler?
  • by epepke ( 462220 ) on Thursday August 28, 2003 @07:35PM (#6820140)


    Event: Somebody actually does something realted to some Apple product.
    Slashdot reaction: Unless it comes in GCC today and fixes me a martini and picks my nose and sings the Hallelujah chorus and comes with a big check, what damn good is it, anyway?

    Event: Somebody at Microsoft says that they might do something in a couple of years if they feel like it.
    Slashdot reaction: Hah! Luser! See, Microsoft already did it.

    Event: Somebody decides that it might be possible to do something cool if they could only get cheap enough buckytubes to wire the brains of ants to the FPU in Python emulated in Perl emulated in ELisp. And it will run on Linux. Except nobody is going to do it, really, but it would be cool.
    Slashdot reaction: Linux is ready for the desktop! Linux is ready for the desktop!

  • by coolmacdude ( 640605 ) on Thursday August 28, 2003 @08:46PM (#6820530) Homepage Journal
    If anyone would like to take the initiative and has access to a G5, IBM offers these instructions [ibm.com] for running SPEC2000 on a G5 using the optimized Fortran compiler.
  • oh sweet jesus (Score:4, Insightful)

    by klez23 ( 524506 ) <slashdot&huzzam,com> on Thursday August 28, 2003 @09:53PM (#6820834) Homepage

    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??

  • by HuguesT ( 84078 ) on Friday August 29, 2003 @12:28AM (#6821518)
    Looking at all these pretty graphs, and knowing that in most cases sane people will restrict their optimization to -O2 (-O3 and above are usually unsafe: not as well tested, may change the program behaviour, cut corners with IEEE math, etc), GCC is still looking pretty good.

    In most cases in both FP and Integer, GCC matches XLC up to -O3, sometimes a bit slower, sometimes a bit faster.

    I applaud the work of the GCC people. GCC is the most versatile and portable C compiler, and it's not half bad at optimizing either.

    Thanks too to IBM. Their compiler will surely prove useful in a lot of cases, and a new compiler to try and benchmark is always good news!

There is very little future in being right when your boss is wrong.

Working...