Mail Archives: djgpp/1997/04/05/22:52:13
godzilla wrote:
> i'm using '-O3 -ffast-math -funroll-loops -fomit-frame-pointer' and the
> runtime-difference to watcom-generated code is usually between 10 and 20 %
> (my loops are huge and no so simple)
> nonetheless i prefer djgpp :-)
> greetings
Speaking of optimization flags, I was playing around with my 3D engine
work-in-progress :) and I found the following combination to be 'the
best'. Mind you, I didn't compare -O2 and -O3 since -O3 and I tend to
get in a lot of arguments.
Anyway, the flags:
The standard stuff
-O2 -ffast-math -fomit-frame-pointer
plus a little seasoning
-malign-double -malign-loops=0 -malign-jumps=0
Now, I'm not sure if aligning to 0 is the same as aligning to 1, but it
does what I want and totally throws out any jump alignment. I'm only
interested in Pentium machines, and AFAIK alignment just slows things
down (NOPs to process), or at least it did for me.
I'm not convinced that -m486 actually does _anything_ (looking briefly
at assembly output, which is what I seem to be spending a lot of time
doing :), so I forget all about it.
Just thought I'd mention this, as I've never seen mention of the jump
alignment switches before...
------------------------------------------------------------------
Brad Spencer - spencer AT ug DOT cs DOT dal DOT ca - in CS @ Dalhousie University
"S.M.A.K.I.B.B.F.B." - A.J. Rimmer | http://ug.cs.dal.ca/~spencer/
- Raw text -