A function declaration with an inline keyword declares an inline function. The inline keyword is used 9L0-509 to suggest to the compiler that a particular function be subjected to in-line expansion; that is, it suggests that the compiler insert the complete body of the function in every context where that function is used and so it is used to avoid the overhead implied by making a 9L0-402 study guide CPU jump from one place in code to another and back again to execute a subroutine, as is done in naive implementations of subroutines.
Marking a function as inline (possibly implicitly, by defining a member function inside a class/struct definition) is a (non-binding) request to the compiler to consider inlining the function, i.e., expanding its code at the call site; it is legal, but redundant, 9L0-509 to add the inline keyword in that context, is to omit it.
Inlining can be an optimization, or a pessimization. It can increase code size (by duplicating the code for a function at multiple call sites) or can decrease it (if the code for the function, after optimization, is less than the size of the code needed to call 9L0-402 audio exam a non-inline function). It can increase speed (by allowing for more optimization and by avoiding jumps) or can decrease speed (by increasing code size and hence cache misses).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment