X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Message-ID: From: Mike Marchywka To: Subject: RE: Cygwin Slow on XP Date: Sun, 9 Nov 2008 13:20:53 -0500 In-Reply-To: <49171BBE.3070804@sh.cvut.cz> References: <20407072 DOT post AT talk DOT nabble DOT com> <491716C0 DOT 40309 AT sh DOT cvut DOT cz> <20408387 DOT post AT talk DOT nabble DOT com> <49171BBE DOT 3070804 AT sh DOT cvut DOT cz> Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id mA9ILto3004377 > Date: Sun, 9 Nov 2008 18:19:58 +0100 > From: v DOT haisman AT sh DOT cvut DOT cz > To: cygwin AT cygwin DOT com > Subject: Re: Cygwin Slow on XP > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > tomotomo wrote: >> The program calculates a factorial of a number. e.g. factorial 11 = >> 11*10*9*8*7*6...*1 > Thanks, I know what is factorial :) I would point out that extraneous code can be a big deal and in fact the factorial may not even be the speed limit here- we need to see the code. Certainly you expect the emulation layer to slow down some stuff and in the past I'd been surprised at how slow std::string functions were and console IO could be terrible. If you could profile the code you may be surprised where the time is going. However, order-of-magnitude comparisons on self-contained computational code ( where the compiler generated code is using most of the CPU time ) hasn't been all that surprising in my cygwin experience - you may be able to do better with the fully optimized intel compiler but an order of magnitude? > >> It's programmed in C++. >> I'm using Cygwin (GNU) C++ compiler to compile it. > The 3.4.x version of GCC on Cygwin suffers performance penalty from SJLJ > implementation of exceptions that it uses. It could be that you are > being bitten by it. But without seeing the real code and the real > command line that you have used to compile the test executable, it is > hard to tell what is making it so slow. > If you are intentionally trying to make a slow case for testing, note that floating point exceptions can be a big deal- actually throwing one irrespective of how the compiler handles it, can be important. If you start generating floating point over or under flows, even at low frequency, these can be performance limiting but this is due to the CPU, not the compiler per se. The compiler has some options on how it handles these, but the fact that they occur is the real problem Haven't thought about integeer handling before but you can look here, http://www.google.com/search?hl=en&q=site%3Aintel.com+integer+exception+performance > Again, you will have to provide more information. > > - -- > VH > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.9 (FreeBSD) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iFYEAREIAAYFAkkXG70ACgkQhQBMvHf/WHn0hQDcDoSm5pFW64ZMcBIJe/5V1hZO > 0JjPtkE4PsE5iADfW7cXdHw8Bo+DnbhA5EXhvYhPSVy7vb9THZ9V/Q== > =4nRA > -----END PGP SIGNATURE----- > > -- > 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/ > _________________________________________________________________ See how Windows® connects the people, information, and fun that are part of your life http://clk.atdmt.com/MRT/go/119463819/direct/01/ -- 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/