Date: Thu, 6 Jul 2000 19:44:18 +0600 (LKT) From: Kalum Somaratna aka Grendel X-Sender: kalum AT roadrunner DOT grendel DOT net To: djgpp AT delorie DOT com Subject: Re: Voodoo optimization? In-Reply-To: <20000706015618.01353.00001528@ng-bj1.aol.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 6 Jul 2000, The awesome and feared S. T. L. commented thusly, > Hi. I've been trying to squeeze more optimized code out of DJGPP by playing > with various switches. (I don't know C yet, but I hope to learn it soon!) I'm > compiling BladeEnc, an MP3 encoder, and want to see how fast I can get it. > (No, I don't use it to transfer music over the Internet.) By turning on > various switches, I've found that the commandline > GCC -s -O2 -march=i686 -fomit-frame-pointer -ffast-math -funroll-loops > -funroll-all-loops -malign-double -fstrict-aliasing -o BLADE.EXE *.c > seems to produce the fastest code. (I'm doing this on a Pentium III system.) > Am I missing any blindingly obvious switches I should be trying? I've tried > several other switches, but they all have no effect or detrimental effects. Did you try -O3..what effect did that have, sometimes it causes the compiler to output code that overflows the cache etc..which can make it slower than -O2. > I'm looking for speed, not for size. Sometimes(often?), unroling loops,and inlining functions can be slower on 586,686 architectures due to the cache overflows etc... Grendel Hi, I'm a signature virus. plz set me as your signature and help me spread :)