Performance: g++ Cygwin vs. other compilers (copying char[] to vector)

Tim Prince
Sun Jul 18 17:03:00 GMT 2004

At 08:48 AM 7/18/2004, Alex Vinokur wrote:

>"Tim Prince" <> wrote in message 
> > At 05:00 AM 7/18/2004, Alex Vinokur wrote:
> >
> > >Hi,
> > >
> > >How to explain so considerable difference in performance: g++ Cygwin vs.
> > >other compilers in tests below?
> > I don't find your compile options, or whether you have profiled.  For g++
> > under cygwin,
>g++ *.cpp -o cps_cyg.exe   // g++ Cygwin
>g++ -mno-cygwin *.cpp -o cps_mgw.exe  // g++ Mingw
>gpp *.cpp -o cps_dj.exe  // g++ Djgpp
>cl /EHsc *.cpp -o cps_ms.exe   // C++ Microsoft
>dmc -I. -IC:/dm/stlport/stlport -Ae *.cpp -o cps_dm.exe  // C++ Digital Mars

Microsoft C default is a good compromise between compilation speed and 
performance.  g++ Cygwin aims for compilation speed and no transformations 
which inhibit debugging.  Performance simply is not comparable without 
normal optimization:
g++ -O3 -Drestrict=__restrict__ -funroll-loops -march=pentium4 -mfpmath=sse 
CL /EHsc /Ox /arch:SSE2 *.cpp
I have no idea about Digital Mars, but STLport does have more optimization 
than MS.
Nor do I know if any of your versions of g++ tinker with default optimization.
I believe clock() is implemented differently between cygwin and msvcrt, and 
you may have additional variations represented here.

Tim Prince 

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list