Poor performance on software cross-compiled for MinGW

Toralf Lund toralf@procaptura.com
Mon Feb 19 16:25:00 GMT 2007


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.

So, can anyone help me out here? Again, I don't expect you to pin-point 
the cause of the problem without getting a much more detailed 
description, but if you can suggest things to check in the compiler 
build config, know about specific things not to do to get an efficient 
binary etc, your input would be most welcome.

One idea I had was that the code would be built without support for 
newer processors and/or the FPU, so I tried

-march=i686 -mhard-float -msse -mfpmath=sse

but this did not make a lot of difference.

- Toralf



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



More information about the crossgcc mailing list