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

  • Home
  • SEARCH
  • 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 985167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:07:35+00:00 2026-05-16T05:07:35+00:00

I am new here so apologies if I did the post in a wrong

  • 0

I am new here so apologies if I did the post in a wrong way.

I was wondering if someone could please explain why is C so slow with function calling ?

Its easy to give a shallow answer to the standard question about Recursive Fibonacci, but I would appreciate if I knew the “deeper” reason as deep as possible.

Thanks.

Edit1 : Sorry for that mistake. I misunderstood an article in Wiki.

  • 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-16T05:07:35+00:00Added an answer on May 16, 2026 at 5:07 am

    When you make a function call, your program has to put several registers on the stack, maybe push some more stuff, and mess with the stack pointer. That’s about all for what can be “slow”. Which is, actually, pretty fast. About 10 machine instructions on an x86_64 platform.

    It’s slow if your code is sparse and your functions are very small. This is the case of the Fibonacci function. However, you have to make a difference between “slow calls” and “slow algorithm”: calculating the Fibonacci suite with a recursive implementation is pretty much the slowest straightforward way of doing it. There is almost as much code involved in the function body than in the function prologue and epilogue (where pushing and popping takes place).

    There are cases in which calling functions will actually make your code faster overall. When you deal with large functions and your registers are crowded, the compiler may have a rough time deciding in which register to store data. However, isolating code inside a function call will simplify the compiler’s task of deciding which register to use.

    So, no, C calls are not slow.

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

Sidebar

Related Questions

(I am new at pretty much everything that I will discuss here... apologies if
am new here. i have a slight problem; PLease look at the following code
I'm new here and I have a problem with the jQuery's function - animate
I'm new here and I hope I could get some help with an Android
I am new to programming, so please accept my apologies if this question is
Im probably missing the point totally here so apologies. But Im wondering what the
This is my first post here so apologies if the setup is kind of
New to posting on stackoverflow here, so my apologies in advance if I messed
Hey I'm a little new here so my apologies if I messed something up
new here and new to jQuery. I've searched for an answer to my question/

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.