At 08:48 AM 7/18/2004, Alex Vinokur wrote:
"Tim Prince" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> 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?
[snip]
> I don't find your compile options, or whether you have profiled. For g++ > under cygwin, [snip]
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 *.cpp
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: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/