Date: Fri, 13 Dec 96 12:44:00 CST From: "Jordy Potman" Message-Id: <58397.s9404198@student.utwente.nl> Reply-To: To: fighteer AT cs DOT com, djgpp AT delorie DOT com Subject: Re: program with profiling info runs slower with DJGPP 2.01 On Thu, 12 Dec 1996 19:06:38 -0800, John M. Aldrich wrote: >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? I think I have not missed the critical question, but I perhaps haven't explained it clear enough. My problem is that my program runs at 30 frames per second under v2.00 WITH -pg and it runs at about 1 fps under v2.01 with -pg. Without -pg it runs at 30 frames per second under both v2.00 and v2.01. I expected the change in speed had something to do with a better profiler in the later version of the compiler, but this is quite a big difference.