This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: slow execution speed when compared against visual c++


Marco Satyro <marco@virtualmaterials.com> writes:

> Dear GCC Help
> 
> I am considering converting a very large project from Visual C++ to GCC.
> This project does lots of scientific computations and therefore the
> execution speed is very important. I am doing the development on a
> Pentium 4 running Windows XP, and I wrote a little program to test the
> execution speed. I installed gcc using cygwin and wrote the program
> using the bloodshed IDE. The program and makefile are attached
> 
> I set the optimization flag to -O3, but I am getting an execution
> speed 480 times slower than when I use Visual C++. It seems like gcc
> is using some kind of floating point emulation instead of using the
> actual hardware math.
> 
> Could you provide me with any clues about this problem?
[snip]

http://www.coyotegulch.com/reviews/almabench.html

has some more realistic benchmarks that show a very different picture. It
    doesn't favor gcc, but does show that code generated by gcc is
    only fractionally than code generated by Intel's compiler.

I don't know what gcc port you are using, but due to cygwin's
    unix emulation (not floating point emu) layer, library calls
    (especially i/o) are sometimes extradinarily slow under cygwin. If
    you are using cygwin gcc, try moving the print statement outside
    of the timed section. You may be surprised by the difference. Note
    that the goal of cygwin is *not* performance - it is intended to
    make it unix applictaions build and run under windows.

On the whole, if you are going to use gcc, you will get much better
    performance under linux than under windows.


    
    
    


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]