Gentoo Archives: gentoo-performance

From: "Ervin Németh" <ervin.nemeth@××××.hu>
To: gentoo-performance@l.g.o
Subject: Re: [gentoo-performance] inline considered harmful
Date: Thu, 22 Jul 2004 09:20:23
In Reply to: [gentoo-performance] inline considered harmful by Mario Domenech Goulart
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


Subject Author
Re: [gentoo-performance] inline considered harmful Dylan Carlson <absinthe@g.o>
Re: [gentoo-performance] inline considered harmful Bart Alewijnse <scarfboy@×××××.com>