To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Program fast w/BC++, slow w/DJGPP Date: Wed, 23 Nov 94 13:52:53 +0200 From: "Eli Zaretskii" A number of people suggested testing without memory managers installed. I've done this: no real effect. Others suggested disabling the (secondary) cache just to see if BC-compiled program fits in, while GCC-compiled does not. This slowed down both programs, but the performance ratio stayed the same. I omitted the -O3 and -funroll-loops and put -O2 and -fomit-frame-pointer instead, as some of you suggested. This improved the performance to some degree: it is now about 2/3 of the speed of BC-compiled program. I've also seen that some of the screen functions cause mode switch (e.g., wherex(), wherey(), clreol() etc.). I will next comment them out to see what happens. A heretic thought started crawling into my mind: can it be that GCC indeed *does* produce slow code for C++ programs? I don't really work in C++, so all my experience about GCC code efficiency comes from C programs. What about those constructors/destructors behind the scenes: could it be they are much slower in G++ than they are in BC++? Opinions, anyone? Maybe I will re-write the program in pure C one of these days... Thanks again to all people who wrote to me on this.