News for hackers. Stuff that matters.
Re:Typedefs & Linus by nkurz on Thursday October 14, 2010 @04:18AM (#1790224)
I liked this this reply farther in to the thread: "inlines, when used properly, are _not_ larger than not inlining"

http://lkml.indiana.edu/hypermail/linux/kernel/0206.1/0843.h...

My usual rule is to not inline anything that calls a full fledged function, and to only explicitly inline things that are truly on high performance paths. Basically, trust that the compiler will inline or not inline the rest as appropriate. But this is another interesting metric to consider.

Re:Typedefs & Linus by Locke1689 on Thursday October 14, 2010 @07:01AM (#1790487)
My usual rule is to not inline anything that calls a full fledged function, and to only explicitly inline things that are truly on high performance paths. Basically, trust that the compiler will inline or not inline the rest as appropriate. But this is another interesting metric to consider.

That's pretty much correct. Keep in mind, though, that inline has different consequences in a header file. There are good and bad reasons for that kind of usage.