Poor performance on software cross-compiled for MinGW

Bill Gatliff bgat@billgatliff.com
Tue Feb 20 00:49:00 GMT 2007

Toralf Lund wrote:
> I just discovered that the output from my Linux-hosted MinGW gcc cross 
> compiler has some performance issues. That is, I have some code that 
> runs 4-5 times faster on Linux (Red Hat Enterprise 4) when built using 
> the standard compiler there, and using the same options as for the 
> MinGW build, than the cross-compiled code does on Windows. The 
> hardware is identical, and the job consists mainly of raw processing, 
> so I'm inclined to blame it on the compiler rather than OS differences 
> or similar. I'm not using any -O... flags at this time.
> Cross compiler version is 3.4.2, with 
> http://surfnet.dl.sourceforge.net/sourceforge/mingw/gcc-3.4.2-20040916-1-src.diff.gz 
> applied and otherwise built using the standard procedure, if there is 
> such a thing. I'll probably write up all the gory details later, but 
> thought I might send a quick post first just to ask for ideas about 
> where to start looking for the cause of the performance gap.

If the cross and native compilers are the same versions, then their 
assembly language output should be virtually identical.  Diff the asm 
for one of your hotspot functions, and see if there are major differences.


Bill Gatliff

For unsubscribe information see http://sourceware.org/lists.html#faq

More information about the crossgcc mailing list