This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: Runtime speed with GNU compilers


Stefano Gragnani writes:
->I have downloaded and installed under Windows NT 4.0 the latest Cygnus
->GNU-Win32 software. All work fine but the time of execution is very very
->slow. For example:

[snip]

->For this we obtain 2062 seconds !!! (My machine is a PentiumPro 200 MHz,
->128 MB RAM)
->With the same code if compiled with the old Borland c++ 4.0 we obtain 219
->seconds and with cross-compilation (Metrowerks CodeWarrior 11 compiler
->under PowerMacintosh) we obtain 125 seconds.
->
->I have not experience with GNU compilers (is the first time I used it), I
->have compiled and linked the file with the command:
->
->g++ -o3 trigtest.cpp
->
->If I well understood the '-o3' option optimize for speed.

Try g++ -o trigtest -O6 -ffast-math trigtest.cc

(Note the capital "O".)

On my P6 200MHz running Linux it takes 117 seconds. Without the
-ffast-math it takes 165 seconds. The -ffast-math option allows the
compiler to take some liberties with respect to the IEEE 754 standard.

I'm running the same example on my 120 MHz P5 laptop running Win95 and
it's taking a while. (More than 2000 seconds.) It's better to compare
numbers from the same machine. But there may be a problem with GCC under
cygwin in this instance. The problem may be in the libraries.

Hope this helps.

Fabio

-- 
Fabio Somenzi          | Phone: 303-492-3466
University of Colorado | Fax:   303-492-2758
ECE Dept.              | Email: Fabio@Colorado.EDU
Boulder CO 80309-0425  | WWW:   http://vlsi.colorado.edu/~fabio
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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