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 6322893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:25:03+00:00 2026-05-24T16:25:03+00:00

In c++, what is a good heuristic for estimating the compute time benefits of

  • 0

In c++, what is a good heuristic for estimating the compute time benefits of inlining a function, particularly when the function is called very frequently and accounts for >= 10% of the program’s execution time (eg. the evaluation function of a brute force or stochastic optimization process). Even though inlining may be ultimately beyond my control, I am still curious.

  • 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-24T16:25:03+00:00Added an answer on May 24, 2026 at 4:25 pm

    There is no general answer. It depends on the hardware, the number and
    type of its arguments, and what is done in the function. And how often
    it is called, and where. On a Sparc, for example, arguments (and the
    return value) are passed in registers, and each function gets 16 new
    registers: if the function is complex enough, those new registers may
    avoid spilling that would occur if the function were inlined, and the
    non-inline version may end up faster than the inlined one. On an Intel,
    which is register poor, and passes arguments in registers, just the
    opposite might be true, for the same function in the same program. More
    generally, inlining may increase program size, reducing locality. Or
    for very simple functions, it may reduce program size; but that again
    depends on the architecture. The only possible way to know is to try
    both, measuring the time. And even then you’ll only know for that
    particular program, on that particular hardware.

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

Sidebar

Related Questions

Good Morning, I have copied this code from somewere <script type=text/javascript> $(function() { setInterval(rotateImages(),
Good afternoon all, I am building a function that takes a string as input,
Good evening, This is my 1st time on this site, I have been programming
This is probably a simple question, but I'm not very good at PostGIS and
Good morning. I am very new to CSS and been reading up on a
Good morning, I have mysql queries where I would like to calculate percentage of
Good day. I need to teach Windows CryptoAPI to encrypt the message with private
Good evening guys. I'm currently trying to get started on development of a project
Good Day, Can someone confirm what was said at the bottom of this post
Good day, I have a class that implements the LoaderCallbacks, and hence have the

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.