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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -