Code Overhead
hobmail
Posts: 1
How would you know or determine the code overhead?
A book (Robotix with boe-bot) pg. 82-82. On a for..next loop, it says that its takes 1.3ms for the loop to execute,
for counter = 1 to 100
pulout 13, 850
pause 20
next
but on page 83,
it says the code overhead is 1.6 ms,
for counter = 1 to 122
pulsout =13. 850
pulsout 12, 650
pause 20
next
So, which one is which? Is it a constant number regardless of how long the for..next loop subroutine is?
Thanks.
A book (Robotix with boe-bot) pg. 82-82. On a for..next loop, it says that its takes 1.3ms for the loop to execute,
for counter = 1 to 100
pulout 13, 850
pause 20
next
but on page 83,
it says the code overhead is 1.6 ms,
for counter = 1 to 122
pulsout =13. 850
pulsout 12, 650
pause 20
next
So, which one is which? Is it a constant number regardless of how long the for..next loop subroutine is?
Thanks.
Comments
To determine the code overhead, you would need to measure the time to do a large number of these loops including the inner statements and subtract the amount of time to do the same large number of these loops less the inner statements.