[ILUG] Suggestions for best 64 bit Linux distro?

Paul Biggar paul.biggar at gmail.com
Thu Jun 23 12:30:23 IST 2005


On 6/23/05, Mel Gorman <mel at csn.ul.ie> wrote:
> funroll-all-loops can be counter-productive. In the event the loops is a
> large loop, it can fill the icache. When this happens, performance will
> decrease - fast.
> 
> It's the same with inline functions. They *are* faster to call because
> they get inlines (hence, they are not really called at all). But if they
> are called a lot and are sizable functions, the binary size increases a
> lot, trashes the cache and performance goes down the tubes.

gcc will refuse to inline function and unroll loops where it
determines a performance decrease. It doesnt usually get it right, but
it certainly wont inline sizable functions that are repeatedly used,
nor will it unroll loops that are so long that it will fill the
instruction cache.  The slow-down is when you unroll loops which do
not have a lot of temporal reuse in the cache. They expel instructions
which do, and this is why you get slowdown.

An unrolled large loop will generally only be unrolled 4-8 times. This
still saves masses of instructions.

Note that gcc also regularly ignores the 'inline' keyowrd for a function.

Paul


-- 
Paul Biggar
paul.biggar at gmail.com



More information about the ILUG mailing list