FOR...NEXT loop overhead time
Casey_SCU
Posts: 19
In chapter 2 of Robotics with the Boe-Bot, v. 2.2 on page 82-83 there is a section about how long it takes to execute a given set of commands. I have expanded the commands in a For...Next loop and was wondering how to compute the time it takes to run the loop.
My main for..next loop consists of only two commands, a GOSUB command. The sub program then has a for...next loop with an imbedded if...then statement.
In the Robotics student guide, for one command it lists the code overhead as 1.3ms, but with two pulsout commands the code overhead is 1.6ms.
Is there a scaling factor used to determine the code overhead based on the number of commands within the For...next loop?
My main for..next loop consists of only two commands, a GOSUB command. The sub program then has a for...next loop with an imbedded if...then statement.
In the Robotics student guide, for one command it lists the code overhead as 1.3ms, but with two pulsout commands the code overhead is 1.6ms.
Is there a scaling factor used to determine the code overhead based on the number of commands within the For...next loop?
Comments
The following link contains most of the available information on PBASIC Instruction execution timings:
http://www.emesystems.com/BS2speed.htm
Thanks go to Dr. Tracy Allen for his work in compiling that information.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->