lkml.org 
[lkml]   [2002]   [Feb]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 21 Feb 2002 18:10:48 +1100
FromCameron Simpson <>
SubjectRe: syscall latency improvement #1
On 10:59 29 Jan 2002, Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> wrote:
| > - If a function has a single call site and is static then it
| >   is always correct to inline.

I'm thinking: any decent compiler will inline this on its own, _without_
an inline keyword. So _don't_ use inline here.

| And what if later you (or someone else!) add another call? You may forget to 
| remove inline. It adds maintenance trouble while not buying much of speed:

Indeed. And handled by the null case of "no inline" used above - the
compiler will get this right if you leave out the inline keywords,
while adding it causes the above issue.

| if func is big, inline gains are small, if it's small, it should be inlined 
| regardless of number of call sites.

Wasn't that case #2? Inline when func < some small number of bytes?
-- 
Cameron Simpson, DoD#743        cs@zip.com.au    http://www.zip.com.au/~cs/

My father was a despatch rider during the last war. He rode BSAs but, for
reasons I still don't understand, he never bothered to tell me that they
were useless, unreliable piles of shit.	- Grant Roff, _Two Wheels_ Nov96
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:24    [W:0.376 / U:0.060 seconds]
©2003-2008 Jasper Spaans