CrazyEngineers
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Ankita Katdare

    AdministratorMar 10, 2014

    @#-Link-Snipped-# What do you mean by a real life example?
    Are you sure? This action cannot be undone.
    Cancel
  • sagar sale

    MemberMar 10, 2014

    it means that actually where we can use inline function in real time
    Are you sure? This action cannot be undone.
    Cancel
  • Ankita Katdare

    AdministratorMar 10, 2014

    Whenever Inline Functions are called, the compiler inserts the complete body of the function in every place that the function is called.
    This is different from generating code to call the function in the one place it is defined.

    I assume that you're asking the advantages of using Inline Functions.
    If you are developing really small and simple programs, use of inline functions is great, because it reduces the overhead of -
    1. calling function
    2. variables push and pop on stack (that happens during call to functions)
    3. return call from function
    Are you sure? This action cannot be undone.
    Cancel
  • Anand Tamariya

    MemberMar 10, 2014

    @#-Link-Snipped-#, what programming language are you familiar with?
    Are you sure? This action cannot be undone.
    Cancel
  • sagar sale

    MemberMar 12, 2014

    yes sir,I am familier with c++.
    Are you sure? This action cannot be undone.
    Cancel
  • Anand Tamariya

    MemberMar 12, 2014

    Inlining won't make much sense unless you understand a little bit about assembly or machine language. A function call involves overhead as the CPU has to keep track of current instruction pointer, then allocate stack space for the function call, execute the same and finally, restore the instruction pointer. With inlining, the code is in sequence and hence this overhead is not required.
    Are you sure? This action cannot be undone.
    Cancel
  • sagar sale

    MemberMar 23, 2014

    Thank you sir.
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register