Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7029771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:34:56+00:00 2026-05-28T00:34:56+00:00

I need to know how does this thing work? By this i mean all

  • 0

I need to know how does this thing work? By this i mean ” all calls to an inline function must be recompiled”. I am reading a book which says that each time the inline function is used in our program, the compiler will recompile the short function definition and place a copy of this compiled short definition in your code.

I don’t understand this at all. An explanation with example showing the whole proces will be highly appreciated. Also, could you please explain how does it improve the efficiency.

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:34:57+00:00Added an answer on May 28, 2026 at 12:34 am

    Suppose you have this code:

    void foo() { bar(); }
    
    int main()
    {
       foo();
       foo();
       foo();
    }
    

    If foo is inlined, then the compiler will essentially rewrite the code as:

    int main()
    {
       bar();
       bar();
       bar();
    }
    

    Now if instead of bar(); you had a more complex piece of code, then that piece of code would appear (and be compiled) three times, rather than just once.

    You trade the cost of a function call against increased and repetitive code.

    The compiler may well refuse to actually inline a function. If you ever take the address of foo and pass it somewhere outside, you cannot even get around creating a stand-alone version. In practice, a happy mix of standalones and inlining will happen, depending on what fits best. (More important to what code ends up being generated is the effect of the inline keyword on the one-definition rule, though.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know why my site is all messed up on safari? I need
So I'm convinced this is a simple thing to work out if you know
I need to know which views does a user have which privileges on. I'm
Does anyone know what would be the minimum rights I would need to grant
Does anyone know the display formatter that I would need to add to the
Does anybody know of a Windows FTP client with SOCKS support? I need it
Does anyone know a good practice of securing media for asp.net? I need to
does anyone know of a good way of doing the following, I need to
does anybody know how to call C++ functions or methods via JavaScript. Need scripting
Does anyone know how to connect DB from Selenium RC? I need to run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.