I'm addicted to reading the linux-kernel list. There's a big thread going on about changing the meaning of "inline" in the kernel tree to mean "if gcc4 wants to" instead of the historical "always-inline!" that was required due to gcc3 quirks. Then introducing a new "__always_inline" to actually mean __attribute__((always_inline)), for the few
(
Read more... )
Comments 17
Reply
Reply
Reply
I say: http://funroll-loops.org/
Reply
Reply
Reply
(The comment has been removed)
The bigger problem is people have been throwing "inline" on every static function with one caller "just because". The problem, as many are quick to point out, is that eventually you have two callers and you forget to remove the inline, then your icache goes to shit and you have 20,000 inlines in the kernel, expanded 100,000 times. (the current situation) Also, those cases of "but there's just one caller!" actually make gcc generate worse code because gcc handles large functions with lots of local variables poorly, and a call would've just been quicker than all the spilling.
Reply
(The comment has been removed)
Reply
Reply
Leave a comment