User: Password:
|
|
Subscribe / Log in / New account

Who is the best inliner of all?

Who is the best inliner of all?

Posted Jan 24, 2009 6:40 UTC (Sat) by HalfMoon (guest, #3211)
In reply to: Who is the best inliner of all? by etienne_lorrain@yahoo.fr
Parent article: Who is the best inliner of all?

Inlining may also depend on the processor you are compiling for, the more available registers there is, the more efficient it is to inline functions.

Also, how good the optimizer is. Even relatively recent versions of GCC seem to have a hard time understanding how, for example, to turn register access functions into single ARM instructions ... unless you hit them over the head with an inline annotation. I've shrunk drivers' I-space footprint from between ten and twenty percent, in some cases, by simple tricks like that.

Contrariwise, sometimes discrete copies of functions are better.

GCC isn't actually known for good inlining, and something that works well on x86 (or, one particular flavor of x86) will sometimes really hurt other processors.


(Log in to post comments)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds