Re: syscall latency improvement #1

Cameron Simpson
2002-02-21T07:10:22Z

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