apple to improve compiler code
Apple is looking to hire some software engineers to improve the gcc compiler and its optimizations for PowerPC:
http://www.compilerjobs.com/jobs/apple.php
They are also wanting to improve compile time.
I'd say this is good news. GCC is not well optimized for PowerPC. I have seen this first hand on IBM JS20 servers. IBM's Visualage XLC compiler generates code that is noticeably faster on the PowerPC 970 than GCC.
What I really think Apple should do, and I don't understand why they haven't, is team with IBM to put objective C into XLC. Ah, nevermind, it looks like IBM is doing that:
http://64.233.167.104/search?q=cache...ient=firefox-a
So, shouldn't Apple license IBM's compilers? I think it would make a huge performance difference on the G5 machines. Compiling OS X and its frameworks with XLC would be a boon to all G5 users, as well as a boon to G4 and G3 users, although to a lesser extent.
http://www.compilerjobs.com/jobs/apple.php
They are also wanting to improve compile time.
I'd say this is good news. GCC is not well optimized for PowerPC. I have seen this first hand on IBM JS20 servers. IBM's Visualage XLC compiler generates code that is noticeably faster on the PowerPC 970 than GCC.
What I really think Apple should do, and I don't understand why they haven't, is team with IBM to put objective C into XLC. Ah, nevermind, it looks like IBM is doing that:
http://64.233.167.104/search?q=cache...ient=firefox-a
So, shouldn't Apple license IBM's compilers? I think it would make a huge performance difference on the G5 machines. Compiling OS X and its frameworks with XLC would be a boon to all G5 users, as well as a boon to G4 and G3 users, although to a lesser extent.
Comments
Originally posted by unixguru
So, shouldn't Apple license IBM's compilers?
Actually I am a bit surprised that they did not already in Tiger, but then who knows what IBM would charge them for that?
Originally posted by unixguru
....
So, shouldn't Apple license IBM's compilers? I think it would make a huge performance difference on the G5 machines. Compiling OS X and its frameworks with XLC would be a boon to all G5 users, as well as a boon to G4 and G3 users, although to a lesser extent.
Last time I heard, gcc was open source and XLC was not. Apple is committed to using open source tools to build MacOS X. You can rest assured that an XLC-compiled MacOS X would be a lot more expensive. Having said that, Apple strongly supports XLC. Recently, I attended an Apple high-performance computing presentation in which the engineers talked extensively about XLC and its performance advantages over gcc.
- Jasen.
Originally posted by T'hain Esh Kelch
Tiger is compiled with the GCC4 specs, and they say that 4.1 should bring a major speed increase (Some say 30%, give or take) compared to 4.0. It should also include auto-vectorisation and auto-altivecoptimizations.
GCC 4 already includes these things, plus a lot of other improvements that improve the PPC code generation. It puts in place a major new architecture for implementing optimizations, considerably modernizing GCC. Future versions will continue to bring new improvements.
Prior to this Apple primarily used Metrowerk's compiler, and before that they used "MrC" which originated from IBM (if I recall correctly). Their use of GCC has been only since OSX arrived on the scene, and since then they have been making continuous improvements to it.
Originally posted by PB
Actually I am a bit surprised that they did not already in Tiger, but then who knows what IBM would charge them for that?
actually, given that IBM is in the biz of selling CPUs, apple could probably work a decent licensing agreement with them.
logic: faster OS and apps --> better "real world" benchmarks --> better rep for IBM CPUs
and likely by-product: more macs sold due to less perception of performance gap --> more IBM CPUs sold --> more ROI for IBM.
that said, sounds like programmer has a good handle on the state of GCC4, and that it's narrowing the gap.
Originally posted by Programmer
"MrC" [?] originated from IBM (if I recall correctly).
It was a collaborative effort between Apple and Symantec, according to DrunkenBlog.
Key change with the bison parser:
http://gcc.gnu.org/gcc-4.1/changes.html
XLC is not free and I believe is > $500 per seat. To add ObjC support means that folks who want something unique that XLC offers for Tiger will pay for it.
For clarification: ObjC++ did not make it in the the GCC branch, but is of course in Apple's modified GCC 4.0, along-side the dynamic libstdc++. What 4.1 will bring with the clean-up between C/ObjC and the bison parser will merge all these Apple additions into the general GCC 4.1 branch. With the heavy work done the optimization work on PPC can be focused more heavily and for folks who use GNUstep and ObjC who have been waiting for ObjC++, GCC 4.1 will be the first version in the 4 series they can use, whether on PPC, x86, so on and so forth.
Originally posted by shadow
Or Apple wants to optimise for cell?
I think they should look into the way the Mac is handling OGL with graphics cards while they do this. I'd like to see the option of better plug and play with PC cards at some extent. Quadro drivers work in Linux. That should be easy enough right?
Originally posted by Mr. Me
Last time I heard, gcc was open source and XLC was not. Apple is committed to using open source tools to build MacOS X. You can rest assured that an XLC-compiled MacOS X would be a lot more expensive. Having said that, Apple strongly supports XLC. Recently, I attended an Apple high-performance computing presentation in which the engineers talked extensively about XLC and its performance advantages over gcc.
I don't think the "free" nature of GCC is why Apple was/is using it. At the time work started on OS X, the only compiler that could compile Objective C on the PowerPC was (I believe) GCC. Most other compilers have dropped ObjC support.
C'mon, you're telling me that Steve Jobs, salesman of the century, couldn't sell IBM on a deal to license XLC? IBM would be stupid to turn down the revenue. I really think Apple could make an agreement for compiling OS X and Apple applications with XLC that wouldn't break the bank.
I'd say the performance benefits of XLC would be well worth the costs. Performance on all Macs would increase appreciably.
Originally posted by mdriftmeyer
Key change with the bison parser:
http://gcc.gnu.org/gcc-4.1/changes.html
With the heavy work done the optimization work on PPC can be focused more heavily and for folks who use GNUstep and ObjC who have been waiting for ObjC++, GCC 4.1 will be the first version in the 4 series they can use, whether on PPC, x86, so on and so forth.
That's very interesting. It says there that 4.1 uses a hand-written parser. I'll have to check that out. I thought all modern compilers probably used parser generators.
Originally posted by unixguru
I don't think the "free" nature of GCC is why Apple was/is using it. At the time work started on OS X, the only compiler that could compile Objective C on the PowerPC was (I believe) GCC. Most other compilers have dropped ObjC support.
C'mon, you're telling me that Steve Jobs, salesman of the century, couldn't sell IBM on a deal to license XLC? IBM would be stupid to turn down the revenue. I really think Apple could make an agreement for compiling OS X and Apple applications with XLC that wouldn't break the bank.
I'd say the performance benefits of XLC would be well worth the costs. Performance on all Macs would increase appreciably.
You don't seem to understand that Apple is a business. Look around the software industry. You see no comparable commercial software project that is not substantially more expensive than MacOS X. Apple's business model makes an OS of the quality of MacOS X available for $129, $69 edu. This is a major reason why Apple replaced Display PostScript with Quartz. This is a major reason why Apple bundles TrueType fonts with its OS rather than PostScript fonts. Essential to the success of Apple's current business model is the use of opensource tools. XCode, arguably the best development system on the planet, is available for every new Mac at no extra charge.
If Apple is a business, IBM is really a business. It is not a charity. Currently, you can get XLC for $400/seat at education prices, which is a 33.3% discount on the standard $600/seat price. Even if IBM reduced the price of XLC by another 75% of the academic price, that would represent a $100 increase in the price of MacOS X in its current configuration. How many people are willing to pay $230 ($170 edu) for MacOS X?
In the final analysis, you proposal makes no sense for Apple. It makes no sense for IBM. It makes no sense for their customers.
Edit: Corrected the mistake in which I called XCode by the name Xtools, which a completely different product.
Originally posted by Mr. Me
You don't seem to understand that Apple is a business. Look around the software industry. You see no comparable commercial software project that is not substantially more expensive than MacOS X. Apple's business model makes an OS of the quality of MacOS X available for $129, $69 edu. This is a major reason why Apple replaced Display PostScript with Quartz. This is a major reason why Apple bundles TrueType fonts with its OS rather than PostScript fonts. Essential to the success of Apple's current business model is the use of opensource tools. Xtools, arguably the best development system on the planet, is available for every new Mac at no extra charge.
If Apple is a business, IBM is really a business. It is not a charity. Currently, you can get XLC for $400/seat at education prices, which is a 33.3% discount on the standard $600/seat price. Even if IBM reduced the price of XLC by another 75% of the academic price, that would represent a $100 increase in the price of MacOS X in its current configuration. How many people are willing to pay $230 ($170 edu) for MacOS X?
In the final analysis, you proposal makes no sense for Apple. It makes no sense for IBM. It makes no sense for their customers.
You don't seem to understand how compilers are licensed. A compiler is a translator. It translates from a high level language like C, ObjC or C++ to assembly language. Compilers are (usually) licensed based on the number of "seats" that may be compiling with it at any one time. Once the compilation is done, there are no royalties on the compiled software, because the compiler is not beng used after that. It has done its job; software is not compiled again when it is used. Display Postscript is quite different. In display postscript, the OS would be actively running Postscript code while in use, hence Adobe can collect royalties.
Are you trying to tell me that if I were to compile an app with MS Visual Studio that I would have to pay MS $500+ for every copy of the program I distribute? How can anyone sell software for less than $500 then?
The only thing that could cause the price of Mac OS to go up by $100+ is if Apple were to actually ship the XLC compiler with every copy of Mac OS. It is quite possible to compile the OS and core libraries with XLC, but still ship GCC as the default compiler for XCode, as is currently done. For example, Windows is compiled with Microsoft's compiler, but you can run programs on it that were compiled with Borland or GCC.
In conclusion, what you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
P.S. What is Xtools? Do you mean the XCode IDE?
Originally posted by Mr. Me
If Apple is a business, IBM is really a business. It is not a charity. Currently, you can get XLC for $400/seat at education prices, which is a 33.3% discount on the standard $600/seat price. Even if IBM reduced the price of XLC by another 75% of the academic price, that would represent a $100 increase in the price of MacOS X in its current configuration. How many people are willing to pay $230 ($170 edu) for MacOS X?
Originally posted by unixguru
The only thing that could cause the price of Mac OS to go up by $100+ is if Apple were to actually ship the XLC compiler with every copy of Mac OS.
That is obviously exactly what he is saying. Even an educational seat for the compiler is big $$$, and more than Apples charges for their OS. Apple can't purchase one copy of it, and distribute it freely with every version of Mac OS X in Xcode like they would need to. Don't you think that may be why they are hiring developers to better GCC for them?
Originally posted by onlooker
That is obviously exactly what he is saying. Even an educational seat for the compiler is big $$$, and more than Apples charges for their OS. Apple can't purchase one copy of it, and distribute it freely with every version of Mac OS X in Xcode like they would need to. Don't you think that may be why they are hiring developers to better GCC for them?
That is one strong reason. Another is that Apple's code could be heavily reliant on extensions, quirks or implementation details within GCC. If it was it would be difficult, time consuming and expensive to port the codebase to another compiler.
Maintaining GCC gives them access to a compiler that can never be taken away from them, and that can be made as great as they need it to be.
Originally posted by unixguru
You don't seem to understand how compilers are licensed. A compiler is a translator....
To the contrary, I understand perfectly.
Originally posted by unixguru
The only thing that could cause the price of Mac OS to go up by $100+ is if Apple were to actually ship the XLC compiler with every copy of Mac OS. It is quite possible to compile the OS and core libraries with XLC, but still ship GCC as the default compiler for XCode, as is currently done. For example, Windows is compiled with Microsoft's compiler, but you can run programs on it that were compiled with Borland or GCC.
Currently, Apple makes gcc available with every copy of MacOS X at no extra cost. Apple gives its users the same compiler that it uses for its own development. This practice allows every Mac user to be a developer if he or she has the skills and desire to do so. It baffles me that you consider bifurcating Apple's development tools as a viable option. This would be a bad idea if it were possible, which it is not. As I said before, to switch from gcc to XLC would add a minimum of $100 to the price of the present configuration of MacOS X.
Originally posted by unixguru
In conclusion, what you've just said is one of the most insanely idiotic things I have ever heard. At no point in your rambling, incoherent response were you even close to anything that could be considered a rational thought. Everyone in this room is now dumber for having listened to it. I award you no points, and may God have mercy on your soul.
It is inappropriate to get personal.
Originally posted by unixguru
P.S. What is Xtools? Do you mean the XCode IDE?
My bad. I meant XCode.
Consider a different example. Sun sells Solaris 9 without a compiler. You don't get any compiler at all. You can download gcc for it and write applications. Sun doesn't use gcc to write Solaris, they use their own compiler. That compiler costs $500 IIRC. You can use gcc, or you can buy their compiler. The choice is yours.
If Apple compiled Tiger with XLC, it would be 10-20% faster at everything right away. Instant speed boost with no negatives at all. No additional costs to end users. All positives, no negatives. XCode can use gcc, be free and still work fine. What, in this picture, is not to like?
Originally posted by cubist
I If Apple compiled Tiger with XLC, it would be 10-20% faster at everything right away.
You seem pretty sure of the numbers. What chance - and I speak as a strict non-programmer - is there for decompilation back to high level and then recompilation with XLC? If zero, I assume getting a copy of Tiger in C++ or whatever it's written in is also zero?
Of course last time I remember reading about was a couple of years ago so I suppose they could have switched?
They should always compile with the fastest possible compiler because it does make a huge speed difference and Window compilers are better. i.e. assuming a 1 GHz G4 is equal to to a 1 GHz P3 in all respects the G4 would wind up around 70%-80% of the speed in actually running stuff due to inferior compilers.