[ydl-gen] Programming for speed on the PS3

Warren Nagourney warren at phys.washington.edu
Thu Mar 8 10:06:01 MST 2007


I found that the xlc compiler produces code that runs about 15%-20%  
faster than gcc. This is on a program with a moderate amount of  
single precision arithmetic. The interesting thing is that the same  
(scalar) code runs about 30% faster on the spu as it does on the ppu  
(with the same 15% advantage to xlc). Provided the code and data fit  
in the local store of the spu, it seems better to use the spu  for  
scalar code! Compared to a G4, the ppu is more or less equivalent to  
a 1.2 GHz processor and the spu is equivalent to a 1.7-2 GHz G4.

On my code, I couldn't detect any difference between O3 and O4 or O5  
using xlc (it couldn't auto-SIMD my program, despite the fact that I  
have an altivec version which runs 4x as fast).


-wn


On Mar 8, 2007, at 7:49 AM, Jonathan Bartlett wrote:

>
>> Will the C code demand a specific IBM-supplied compiler (and if so,
>> how do I get it?), or will the gcc that comes with YDL 5 suffice?  I
>> suspect this is a basic "Cell 101" question, but I thought i'd  
>> ask ...
>>
>>
> 1) IBM added all of their Cell-specific stuff into GCC, and yes, it  
> ships with YDL.
> 2) IBM also makes their own compiler, called XLC, which is freely  
> available for the Cell SPU, and it comes when you download the SDK  
> straight from IBM (it is free as in beer not speech).
>
> Determining which compiler is better depends greatly on what is  
> being compiled.  In the few times when I checked it out, I found  
> GCC did a _lot_ better with combining instruction scheduling and  
> loop unrolling, while XLC did branch hinting much better.  Both of  
> them were about 30% slower than hand-coded assembly language in the  
> general case, and then only with -O3.
>
> Jon
> -- 
> <jon_logo.jpg>
> <jon_logo.jpg>
> _______________________________________________
> yellowdog-general mailing list
> yellowdog-general at lists.terrasoftsolutions.com
> http://lists.terrasoftsolutions.com/mailman/listinfo/yellowdog-general
> HINT: to Google archives, try  '<keywords>  
> site:terrasoftsolutions.com'



More information about the yellowdog-general mailing list