When should I write the keyword inline
for a function/method in C++?
After seeing some answers, some related questions:
When should I <
When developing and debugging code, leave inline
out. It complicates debugging.
The major reason for adding them is to help optimize the generated code. Typically this trades increased code space for speed, but sometimes inline
saves both code space and execution time.
Expending this kind of thought about performance optimization before algorithm completion is premature optimization.