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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:50:05+00:00 2026-05-14T16:50:05+00:00

I have programmed an embedded software (using C of course) and now I’m considering

  • 0

I have programmed an embedded software (using C of course) and now I’m considering ways to improve the running time of the system. The most important single module in my system is one very large nested for loop module.

That module consists of two nested for loops that loops max 122500 times. That’s not very much yet, but the problem is that inside that nested for loop I have a function call to a function that is in another source file. That specific function consists mostly of two another nested for loops which loops always 22500 times. So now I have to make a function call 122500 times.

I have made that function that is to be called a lot lighter and shorter (yet still works as it should) and now I started to think that would it be faster to rip off that function call and write that process directly inside those first two for loops?

The processor in that system is ARM7TDMI and its frequency is 55MHz. The system itself isn’t very time critical so it doesn’t have to be real time capable. However the faster it can process its duties the better.

Also would it be also faster to use while loops instead of fors? And any piece of advice about how to improve the running time is appreciated.

-zaplec

  • 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-14T16:50:05+00:00Added an answer on May 14, 2026 at 4:50 pm

    TRY IT AND SEE!!

    It’ll almost certainly make a difference. Function call overhead isn’t usually that much of an issue, but at over 100K repetitions it starts to add up.

    …But whether or not it makes any real-world difference is something only you can answer, after trying it and timing the results.

    As for for vs while… it shouldn’t matter unless you actually change the behavior when changing the loop. If in doubt, make your compiler spit out assembler code for both and compare… or just change it and time it.

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

Sidebar

Ask A Question

Stats

  • Questions 502k
  • Answers 502k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Assuming TSQL to mean SQL Server, have you seen this… May 16, 2026 at 2:32 pm
  • Editorial Team
    Editorial Team added an answer This RE: ([\d.]+)%? What language are you using? May 16, 2026 at 2:32 pm
  • Editorial Team
    Editorial Team added an answer As Felix says, this requires JavaScript. It would be something… May 16, 2026 at 2:32 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am a DSP, embedded software programmer, looking to improve my assembly language programming
In an embedded application programmed on C on ARM7 (with portability requirements), currently using
I am a self-taught embedded developer. I mostly use AVRs programmed in C and
Let's say you have a website contest programmed in PHP, and the user must
Disclaimer: please do not bother reading this long post unless you are an embedded
I'm working on fixing up a legacy web application with jQuery. I have a
So I have been playing a lot of pacman on my cell lately and
I'm going to have to learn php soon, because I need it for a
I am an intermediate programmer, and have decided to learn either common lisp or
I seem to have a problem, I have a growing business to run but

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.