inline function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanjay123456
    New Member
    • Sep 2006
    • 125

    #1

    inline function

    sir

    Is possible that source code and exe file size are increase when we make a function as inline ? and why ?

    sanjay
  • kenx125
    New Member
    • Oct 2006
    • 7

    #2
    Originally posted by sanjay123456
    sir

    Is possible that source code and exe file size are increase when we make a function as inline ? and why ?

    sanjay

    I must say the reason for inline functions is efficiency. For example, everytime a function is called, a series of instructions must be executed, to set up the function call and to push any arguments onto the stack. In some instances many CPU cycles are used to perform these procedures. When you expand a function inline no such overhead exists and the overall speed of your program will increase. Even when your inline function is large, the overall size of your program will increase. For this reason, the best inline functions are those that are small.

    Comment

    Working...