From: Fabrice ILPONSE Newsgroups: comp.os.msdos.djgpp Subject: Re: Pointer to ... and a question Date: Thu, 27 Nov 1997 14:03:32 +0100 Organization: Universites Paris VI/Paris VII - France Lines: 31 Message-ID: <347D6FA4.4199@trash.lip6.fr> References: <3477ACD7 DOT 29CFC486 AT polymtl DOT ca> <347C6C94 DOT 3963 AT mail DOT telepac DOT pt> NNTP-Posting-Host: asim.lip6.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk William A. Barath wrote: > > On Wed, 26 Nov 1997, Paulo Marques wrote: > On more than one occasion I have written C and ASM code and compared > operation (writing the C after the ASM, hoping as I did for TPC that the > compiler would make similar coding choices to what I would have) and > almost every time GCC has produced code that ran faster- even when the > code was larger or apparently less efficient! So I can only assume that > the compiler knows more about the machine organization than I do and is > capitalizing on that. I think it depends which kind of program you've written the code for!! For me, for a polygone routine, my assembly code was faster and I,ve only traduce (with some optimization of mine) the C code that was even optimized!! PS: the C code was compiled with -O2 -s -m486 ----------- I've heard that the -O3 option was "buggy". As the problem's been fixed? -- ^ ^ ^ | | | +-+-+ Fabrice ILPONSE | | | -