Subject: Re: [linux-audio-dev] LADSPA Update (http://www.ladspa.org)
From: Benno Senoner (sbenno_AT_gardena.net)
Date: Tue May 23 2000 - 00:21:10 EEST
On Mon, 22 May 2000, David Benson wrote:
> > What about -funroll-loops or -funroll-all-loops? I admit I'm an ignoramus when
> > it comes to compiler optimizatios, and I don't even really know what loop
> > unrolling is, but last time I looked the PGCC FAQ recommended loop unrolling for
>
> speed v size tradeoffs can foil you when applied universally
> and unnecessarily. anyways there's a pandoras box of experimental
> options along these lines. perhaps i'll add a reference to
> the gcc manual, which we are not a replacement for :)
>
> - dave
My strategy is to keep small functions which are called often in headerfiles
(preceding these with the _inline keyword) so that the complier can
easily inline these functions in all modules which uses them.
Plus another hack is to do some explicit manual unrolling especially where
there is a loop with only 1-2 statements. I don't trust compilers enough.
Remember that the greatest amount of speedup is obtained at sourcelevel,
not at compile time.
Even the smartest compiler is not clever enough to optimize bad written code.
(complex out-of-loop variables/statements etc).
Using my tricks above , gcc generates pretty damn good code, close to
the optimum.
Benno.
This archive was generated by hypermail 2b28 : Tue May 23 2000 - 01:35:49 EEST