Boost logo

Geometry :

Subject: [ggl] inline keyword in class definition
From: Mateusz Loskot (mateusz)
Date: 2009-05-06 06:28:08

Barend wrote:
> Hi,
>>> However, in my experience the inline keyword actually has an effect
>>> for free functions. Especially on short free functions, it really
>>> seems to influence the compiler (at least GCC). So I suggest to leave
>>> them only on free functions.
>> I guess, free functions defined in headers but not specified as inline
>> may break One Definition Rule.
> I just checked using our comparison programs. Please leave them there.
> Without inline the performance drops with 10-20%, using gcc 3.4.4 / Cygwin.
> For gcc 4.3.0 they do not have any measurable negative or positive effect.

Just a side note, I'm not Cygwin nor MinGW expert, but I've heard GCC
does not optimize well on Windows. It tells me that these ports are
not bets choices to measure performance.

> However, they do not any harm, they are everywhere in Boost, removing
> them cost time and is bad for old compilers, so let's keep them...

Sure, I'm not going to remove.
I wanted to check if we want to put must specify inline" as a guideline.

Best regards,

Mateusz Loskot,

Geometry list run by mateusz at