Re: unroll-loops - Is it always safe?

2007-04-05 Thread Gary Kline
On Thu, Apr 05, 2007 at 09:54:08AM -0300, [EMAIL PROTECTED] wrote:
> Hi All,
> 
>   Is it always safe to use "-funroll-loops" as a flag to 
> /etc/make.conf ? Does it realy improve the compiled programs?
> 
>   When should I avoid to use it?


If you are using gcc42 -funroll-loops can be a win. gcc3.x
is less savvy about knowing the limits of complexity to unroll
which loops.  I'm doing some tests with gcc34 (default) and
gcc42. The latter can yield significant improvements  iff
you know what you're doing.  It's no magic bullet.

gary


> 
> - Marcelo
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
  Gary Kline  [EMAIL PROTECTED]   www.thought.org  Public Service Unix

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: unroll-loops - Is it always safe?

2007-04-05 Thread Kris Kennaway
On Thu, Apr 05, 2007 at 09:54:08AM -0300, [EMAIL PROTECTED] wrote:
> Hi All,
> 
>   Is it always safe to use "-funroll-loops" as a flag to 
> /etc/make.conf ? Does it realy improve the compiled programs?

No and usually not.

>   When should I avoid to use it?

You should never use it unless you have measured an improvement on
specific code.

Kris


pgpzVLTzbA7zC.pgp
Description: PGP signature