Re: syscall latency improvement #1

From: Cameron Simpson (cs@zip.com.au)
Date: Thu Feb 21 2002 - 02:10:48 EST


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/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:29 EST