tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: KNF and the C preprocessor



> I'd like to submit that neither are a good thing, because human
> beings are demonstrably quite bad at deciding when things should be
> inlined, particularly in terms of the cache effects of excessive
> inline use.

Compilers are no better when - as is often the case for NetBSD - there
is no compile-time knowledge of exactly what CPU will end up running
the code.  Indeed, I doubt the compiler is capable of being told things
like the exact size of the cache, size of a cache line, and what else
will be running at the same time, any of which can tip the balance of
whether inlining or calling is better.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index