Snow Leopard: Will developers buy in?

capmac

Registered
Looking at the Snow Leopard section of Apple's web site, the main selling point of the upcoming OS is performance. It looks like Apple has invested a lot in developing the performance enhancing technologies in 10.6. However, Apple points out that most of the technologies require developers to rewrite their code in order to take advantage of them.

I'm not an extremely close follower of the Mac scene, so I may have missed something, but the last major performance enhancing Apple technology that I can remember was Altivec, a technology that Apple abandoned after about two years when they switched to Intel.

I'm wondering if developers who coded for Altivec and found that effort wasted will be discouraged from coding for these new technologies. Will they buy in? Will they make the effort to make the changes that will make systems running Snow Leopard work efficiently?
 
...Apple points out that most of the technologies require developers to rewrite their code in order to take advantage of them.
Not rewrite -- modify. They don't have to start over from scratch.

...Altivec, a technology that Apple abandoned after about two years when they switched to Intel.
The G4 and G5 processors (the processors that supported AltiVec) were in use and being sold from December 1999 to August 2006. That's nearly three times the amount of time you've given them, and more than half a decade. That's a good run for AltiVec, and it was almost "trivial" to modify a program for AltiVec. For example, a simple loop that adds one each element of an array for 100 iterations would look like this:
Code:
for i = 1 to 100
   x[i] = x[i] + 1
next

For AltiVec to "kick in," the loop would be easily modified like so:
Code:
for i = 1 to 100 step 4
   x[i] = x[i] + 1
   x[i+1] = x[i+1] + 1
   x[i+2] = x[i+2] + 1
   x[i+3] = x[i+3] + 1
next
...so easy a "find/replace" could modify the large majority of your program for you to support AltiVec.

Not to mention that the same piece of "AltiVec" code would run on both an AltiVec-enhanced processor and a non-AltiVec-enhanced processor just the same, so the developers did not have to manage two branches of separate code -- just code once, and if the processor has AltiVec, then BAM -- instant speed boost. If not, it's business as usual.

I'm wondering if developers who coded for Altivec and found that effort wasted will be discouraged from coding for these new technologies. Will they buy in? Will they make the effort to make the changes that will make systems running Snow Leopard work efficiently?
While not every program will take advantage of the enhancements in Snow Leopard, developers had better hop on board or else get left in the dust.

It's quite apparent that the forseeable future of processors is going to be centered around multiple cores. Snow Leopard's enhancements allow developers to take advantage of multiple cores in a very easy way -- before "Grand Central" (the technology to help developers with multiple cores), developers would have to specifically code their programs if they wanted any kind of performance boost from multiple cores. That meant tracing the program and figuring out where multiple threads could be implemented, figuring out what operations could be done independent of others, and then re-writing whole blocks of code in order to take advantage of that.

Grand Central will ease all of that. It will allow developers to modify their programs to be speed demons (where applicable) without having to have the developers rewrite entire logical blocks of their program.

If any developer worth his beans is planning on keeping their developer job, they had better hop on-board with the new technologies of Snow Leopard (or at least subscribe to the theory of it if they code for a different platform). Coding techniques change from decade to decade, and programmers being taught today are being taught much different techniques and in much different languages than those of 10 years ago. Those of 10 years ago are always having to learn and relearn things to keep up with the times.

Programming is a very dynamic and ever-changing field of study. Any programmer unwilling to hop on-board with a new technology could hardly call themselves a professional programmer.
 
I own Adobe Photoshop CS3. I wonder whether upgrading to Snow Leopard will mean having to upgrade Photoshop too?
 
it was almost "trivial" to modify a program for AltiVec. For example, a simple loop that adds one each element of an array for 100 iterations would look like this:
Code:
for i = 1 to 100
   x[i] = x[i] + 1
next

For AltiVec to "kick in," the loop would be easily modified like so:
Code:
for i = 1 to 100 step 4
   x[i] = x[i] + 1
   x[i+1] = x[i+1] + 1
   x[i+2] = x[i+2] + 1
   x[i+3] = x[i+3] + 1
next

Are you serious? That looks like the kind of optimization compilers could make — and did make, long before CPUs performed vector operations, in order to take full advantage of the bus width. Why would a programmer have to write code like that?
 
Many compilers did to that to an extent, with a simple flag on the gcc command line, I believe... I'm not saying that's the one and only example of Altivec optimization -- there are many others in many different forms -- and not that all optimizations were trivial, but that any programmer worth his beans could make a half-assed attempt at Altivec optimization and really get somewhere with it.

Not all Altivec optimizations were loop-based, either, but a large majority were... loop unrolling was what really got you somewhere:

http://www.ibm.com/developerworks/power/library/pa-unrollav3/

Altivec didn't do things that hadn't been done in the past -- it just did it magnitudes of times faster and was specially geared toward vector processing.

IBM has great documentation and white papers on their Altivec stuff. It was some serious poop back in the day.
 
That's good Tommo. Even I was so concerned about using Photoshop CS3 on Snow Leopard Build. Although for now, I am not so sure about Snow Leopard too.
 
Back
Top