Possible Duplicate:
Benefits of inline functions in C++?
I have a confusion regarding the inline function.
People say inline functions saves CPU time by replacing the function with the original code, but that it increases the size of the code when compared to a normal function.
So the real question is if I keep on calling that inline function within a loop for 10 times, will the code size get increased.
Suppose the inline function size is 2 bytes, will it increase by 20 bytes?
Can anyone explain it to me?
The same code will be executed 10 times. But still within a loop, so the code is not copied 10 times in a row. So size will not grow with the number of executions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With