FAQ 13.05 What are some performance considerations with inline functions?

FAQ 13.05 What are some performance considerations with inline functions?

Here are some important facts about inlined functions.

  1. They might improve performance, or they might make it worse (see FAQ 13.06).

  2. They might cause the size of the executable to increase, or they might make it smaller (see FAQ 13.07).

  3. When they are nontrivial, they probably will complicate the development effort if employed too early in the development cycle. Provisions to use them can be made early but the final decision should be made later (see FAQ 13.08).

  4. When they are provided to third-party programmers, they can make it difficult to maintain binary compatibility between releases of the software (see FAQ 13.09).

The only dangerous idea about inlining is the attitude that says, "Fast is good, slow is bad; inlining is faster, so everything should be inlined." If only life were that simple.



C++ FAQs
C Programming FAQs: Frequently Asked Questions
ISBN: 0201845199
EAN: 2147483647
Year: 2005
Pages: 566
Authors: Steve Summit

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net