The use of inline functions generates faster code and can sometimes generate smaller code than the equivalent function call generates for the following reasons:
It saves the time required to execute function calls.
Small inline functions, perhaps three lines or less, create less code than the equivalent function call because the compiler doesn’t generate code to handle arguments and a return value.
Functions generated inline are subject to code optimizations not available to normal functions because the compiler does not perform interprocedural optimizations.
Answer:
The use of inline functions generates faster code and can sometimes generate smaller code than the equivalent function call generates for the following reasons:
- It saves the time required to execute function calls.
- Small inline functions, perhaps three lines or less, create less code than the equivalent function call because the compiler doesn’t generate code to handle arguments and a return value.
- Functions generated inline are subject to code optimizations not available to normal functions because the compiler does not perform interprocedural optimizations.
need an explanation for this answer? contact us directly to get an explanation for this answer