[EMAIL PROTECTED] wrote:
> 
> << I tried all sorts of compiler flags - unfortunately, the optimization
> flags are not linear, especially -O5 tends to produce much slower code
> than -O4 when combined with other flags. >>
> 
> I see similar weird slowdowns using the -O5 compile option on some (not
> all) Alpha CPUs (generally the older ones.) I wonder if both compilers
> are doing similar "optimizations" at -O5.

   The Sun C compiler -O5 flag should only be used when using
a profile to direct subsequent compilations...  The way to use
it is to compile with -xprofile=collect then run then recompile
with -xprofile=use...

   This might be something similar for Alpha.

   However some optimizations done at higher levels of
optimization might produce slower code.  An example is too much
loop unrolling producing code that does not fit well in L1
I-Cache.

> << I'm using -fast -libmil -xlibmopt -fnsyes now, which seems to give
> close to optimal performance. >>
[...]
> << I dont know whether this is also optimal on other types of UltraSparc, I
> only have Ultra60s for testing. >>

   This won't be optimal if you run under Solaris < 7!  Under
such OSes the -fast flag must be followed by a -xarch=v8plus in
order to use all 32 double FP regs of an UltraSPARC chip.  This
is not the case for a Solaris 7 system where -fast will use
-xarch=v9.

   Flags to also test are:

        -xdepend
        -xinline=all
        -xsafe=mem (to be used with -xO5)

Good luck ;)


                Laurent
_________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to