Regarding adding several decisions in a programme.

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
sanfr
Posts: 12
Joined: Mon May 09, 2016 11:36 am
Has thanked: 12 times

Regarding adding several decisions in a programme.

Post by sanfr »

Hi,
I am a newbie, a beginner in this amazing world of microcontroller programming & I feel Flowcode to be equally amazing.
I have started to learn it on my own from internet.

The question is to all Respected users and of course to the Moderator, I know it's a very basic question but please bear with me and please answer me,

Question: Does adding too many decisions make a programme slower?

Thanks and regards
Sanfr

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Regarding adding several decisions in a programme.

Post by Benj »

Hello Sanfr and Welcome,

A simple branched decision will generally eat up two instruction cycles.

As the device will likely be running at a rate of millions of instructions per second adding many decisions shouldn't have a noticeable effect unless you are looking for very strict micro second based timings.

sanfr
Posts: 12
Joined: Mon May 09, 2016 11:36 am
Has thanked: 12 times

Re: Regarding adding several decisions in a programme.

Post by sanfr »

Thanks a lot Sir for giving your precious time & guiding me. I am very grateful...

Post Reply