c++ - When should I use inline functions? -


possible duplicate:
when should write keyword 'inline' function/method?

i have question inline functions in c++. know inline functions used replace each apperance inline function body. not know when use it. said inline functions can improve performance, when should consider using inline function?

inline functions best small stubs of code performance-critical , reused everywhere, mundane write.

however, use them split code, rather having 1000-line long function, may end splitting couple of 100-line long methods. inline these have same effect 1000-line long method.

modern compilers automatically inline of smaller methods, can manually inline ones bigger.

there many resources this, example:


Comments

Popular posts from this blog

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -