Roland Mainz wrote:
> Jyri Virkki wrote:
>   
>> Roland Mainz wrote:
>>     
>>> http://cr.opensolaris.org/~chriszhu/ruby-webrev/usr/src/cmd/ruby18/Makefile.sfw.html
>>>       
>>>> RUBY_CFLAGS="-fast -xipo -xtarget=generic"
>>>>         
>>> Please do _not_ use "-fast". "-fast" is a macro which expands to many
>>> options, including those who change the representation of the
>>> floating-point datatypes (which is usually bad (unless you're sure the
>>> code doesn't rely on some certain floating-point features)) and change
>>> framepointer stuff on x86 (AFAIK the DTrace people won't like that...).
>>>       
>> AFAIK these come from the work done by the performance team while
>> figuring out build options for CoolStack:
>> http://src.opensolaris.org/source/xref/webstack/webstack/trunk/src/ruby-1.8.6/make_solaris.sh
>>
>> (Doesn't necessarily mean it is right.. would like to hear from the
>> perf team about it though.)
>>     
>
> Two things:
> - "-fast" is in _any_ case wrong since it's a compiler macro which
> expands to a list of other options which changes from compiler to
> compiler version. It's a minefield armed with teeth. If you'want to use
> the options please list each option seperately but do not use "-fast".
>   
The Sun Studio guys do a lot of work to have the defaults hit the "sweet 
spot" in
Sun's HARDWARE portfolio.  This is without -fast.

The -fast option is intended to be most optimal for the platform you 
happen to
be building on.  Sometimes this is very useful in the general case.  Its 
certainly
useful in the benchmarking case.

In general, just use the default.  As Roland suggests, if there is something
about some Ruby object which will benefit by a *specific* option, use it.
However, our experience has been that without testing on a wide variety
of platforms, you well get it wrong more often than right.  I doubt anybody
(except Sun itself) has test labs with sufficient diversity of platforms.

- jek3



Reply via email to