Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <6.0.1.1.0.20040718091528.01f24730@imap.myrealbox.com> X-Sender: tprince AT imap DOT myrealbox DOT com Date: Sun, 18 Jul 2004 09:24:35 -0700 To: "Alex Vinokur" , cygwin AT cygwin DOT com From: Tim Prince Subject: Re: Performance: g++ Cygwin vs. other compilers (copying char[] to vector) In-Reply-To: References: <6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040718063702 DOT 01f796e8 AT imap DOT myrealbox DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-IsSubscribed: yes At 08:48 AM 7/18/2004, Alex Vinokur wrote: >"Tim Prince" wrote in message >news:6 DOT 0 DOT 1 DOT 1 DOT 0 DOT 20040718063702 DOT 01f796e8 AT imap DOT myrealbox DOT com... > > 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/