From: "John M. Aldrich" Newsgroups: comp.os.msdos.djgpp Subject: Re: program with profiling info runs slower with DJGPP 2.01 Date: Thu, 12 Dec 1996 19:06:38 -0800 Organization: Three pounds of chaos and a pinch of salt Lines: 38 Message-ID: <32B0C83E.221@cs.com> References: <54622 DOT s9404198 AT student DOT utwente DOT nl> Reply-To: fighteer AT cs DOT com NNTP-Posting-Host: ppp211.cs.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: j DOT potman AT student DOT utwente DOT nl DJ-Gateway: from newsgroup comp.os.msdos.djgpp Jordy Potman wrote: > > Hello, > > I have just upgraded from DJGPP 2.00 to DJGPP 2.01. My program > ( a 3D graphics program) runs just fine build with DJGPP 2.00, > but if I rebuild it with the same makefile using DJGGP 2.01 it > runs about 30 times slower (The frame rate drops from 30 to 1 frame > per second). This happens only when the -pg option is turned on. Without > this option the program runs fine with DJGPP 2.01. > > I hope someone can explain me why there's such a big speed difference > between version 2.00 and 2.01. Profiling ALWAYS makes your program run slower - there's a tremendous amount of overhead involved in detecting each and every function call and storing the data. It doesn't matter whether it's on v2.00 or v2.01. Besides, in comparing profiling and non-profiling code, you are comparing apples and oranges. It would be more interesting if v2.00 and v2.01 differed when _both_ were compiled for profiling. If you do notice such a change, it's likely to be because the later version of the compiler has a more sophisticated, and thus slower, profiler. You're missing that critical question: how fast does it run under v2.00 with -pg? -- John M. Aldrich * Anything that happens, happens. * Anything that, in happening, causes something else to happen, causes something else to happen. * Anything that, in happening, causes itself to happen again, happens again. * It doesn't necessarily do it in chronological order, though. --- Douglas Adams