[Mono-devel-list] poor PPC JIT output

Allan Hsu allan at counterpop.net
Thu Jul 14 22:02:28 EDT 2005


Code generated by the PPC code emitter performs very poorly in  
comparison to the same code emitted for other platforms (most  
notably, x86). I had a brief conversation about this with Miguel in  
#mono today and he suggested that I post some examples.

Preliminary profiling with Shark (a profiling tool that is part of  
the Apple CHUD tools) shows some heinously inefficient JIT output on  
both G4 and G5 machines. Here's some sample Shark analysis on the  
code emitted by mono 1.1.8.1 from  
System.Security.Cryptography.RijndaelTransform.ECB(byte[], byte[])  
and System.Security.Cryptography.RijndaelTransform.ShiftRow(bool):

http://strangecargo.org/~allan/mono/

Information on how to read Shark analysis comes with Shark (available  
for free from the Apple Developer Connection website). (A summary:  
numerous and frequent pipeline stalls, unoptimized loops).

Is there any active effort to optimize the PPC code emitter? The  
above two methods account for the majority of CPU time on a pegged  
2Ghz G5 while decrypting AES blocks coming off the wire. The x86  
machine encrypting the data (also running mono) doesn't even break a  
sweat.

     -Allan
--
Allan Hsu <allan at counterpop dot net>
1E64 E20F 34D9 CBA7 1300  1457 AC37 CBBB 0E92 C779





More information about the Mono-devel-list mailing list