Below are some good points about inline function to keep in mind.
- Usage of inlne funcation , May increase function size so that it may not fit on the cache, causing lots of cahce miss.
- You can not use static variable in Inline funcation. If you use them then compiler will not treat this as inline funcation.
- You can not use recursion with inline funcation
- If funcation return value depends on any used loop, swicth or goto statement in your funcation then compiler will not treat this as inline funcation
inline funcation are good than macro becuase, macro does not perform any type checking/usual error checking while compilation.
Macro are like find and replace while preprocessing steps.
No comments:
Post a Comment