From: "Andrew Crabtree" Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp and optimizations Date: Wed, 16 Sep 1998 16:00:07 -0700 Organization: Hewlett Packard Lines: 32 Message-ID: <6tpftm$iif$1@rosenews.rose.hp.com> References: <000301bde180$e0d71f20$bb4d08c3 AT arthur> NNTP-Posting-Host: ros51675cra.rose.hp.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk >So how come I get such a poor performance when using -O7 (and other PGCC >stuff), whilst I get a huge speed boost using -mpentium (the gcc 2.8.1 >version, not PGCC)? Dunno. I can take several guesses, but some or none of them may apply. Here goes 1) PGCC is very picky about alignment. If you didn't fix the alignment in the crt you could have bad problems 2) Some of the options after -O4 are broken and generate slower code. Some of them are tailored for PPro and generate slower code for Pentiun, and vice versa. 3) -O7 can do strange things with code bloat, and you could be running into cache functions. For pgcc to really be effective you generally have to go through a combination of the individual options until you find what works best with your code and your cpu. You might want to try -fno-risc and -fno-inline-functions to see if that helps. >And why on earth doesn't PGCC cater for the MMX chip? Adding MMX support into the compiler doesn't happen all that easily. There is somebody adding mmx support to gcc but it is separate from the pgcc project. There are many difficulties involved in doing this. Not sure what state it is in. Andy