
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Michael Marcin wrote:
Thomas Klimpel wrote:
I would expect that current compilers know better when inlining a function provides a benefit than the programmer.
They don't.
This is really sorta off-topic here, but I find that statement hard to believe. Can you in any way substantiate that argument? I personally *never* use the keyword inline, since the compiler is free to ignore it, and may choose to inline functions I have not declared inline. What little I do know about compiler internals would lead me to believe that they could - and should - indeed know better than the programmer when it makes sense to inline a function. To complicate matters further, inlining a given function may make sense in certain contexts but not others. I believe Herb Sutter has given the subject thorough treatment some years gone. Nothing I have experienced has caused me to doubt his words in this matter. /Brian -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJPWfNk1tAOprY6QERAuAWAKCO9QOXYrCMYq9mYeJzd+TJKVf7AQCglgcO Iz4TY9G+lO785sIqqdbAW9M= =lLDa -----END PGP SIGNATURE-----