Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-performance
Navigation:
Lists: gentoo-performance: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-performance@g.o
From: Ervin NĂ©meth <ervin.nemeth@...>
Subject: Re: inline considered harmful
Date: Thu, 22 Jul 2004 11:20:16 +0200
Mario Domenech Goulart wrote:
> There's an interesting discussion in the OpenBSD mailing
> list about the use of inline.

There is no such thing as "best optimization". Some optimization 
techniques tend to show better performance on the average, but given a 
specific code, the same technique can fail dramatically.

Inlining makes the code faster if the called function is small 
(preferably smaller than a cache-line), and called only a few times. No 
inlining will result in faster code if the function is large (at least 
one complete cache-line is used), and that function has a good chance to 
be already in the cache when called.

Also inlined functions allow the block-reordering code to do interesting 
things. Block-reordering was introduced in gcc3, BSDs are using 
gcc-2.95, AFAIK.

So far the facts.

Now the manual says that for gcc the inline-limit is 600 bytes, compared 
to the 32-128 byte cache line size of the x86 CPUs. It could be worth to 
try lower numbers with inline-functions...


/Ervin

--
gentoo-performance@g.o mailing list

Replies:
Re: inline considered harmful
-- Bart Alewijnse
Re: inline considered harmful
-- Dylan Carlson
References:
inline considered harmful
-- Mario Domenech Goulart
Navigation:
Lists: gentoo-performance: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: inline considered harmful
Next by thread:
Re: inline considered harmful
Previous by date:
Re: inline considered harmful
Next by date:
Re: inline considered harmful


Updated Jun 17, 2009

Summary: Archive of the gentoo-performance mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.