Programming Speed
hmlittle59
Posts: 404
in BASIC Stamp
Hello All,
Trying to find the "execution" speed of the PBASIC (GET/PUT) commands. Reason: I had to re-write some code in a SLOT and switched from Variables that was being re-used in certain routines and started using the (GET/PUT) Commands and GOSUB routines. Worked great, even had space left over (100 bytes)....GREAT.
But now that LOOP seems to be going almost 3,4 or more times slower. NOTE: I'm judging this by the DATA being printed on the DEBUG Terminal. Before I would add a PAUSE command to view the DATA on the Terminal. But now the PAUSE commands had to be removed.
The HELP file with the Editor does not give me the (GET/PUT) command "execution" speed.
Over all program still flows smoothly, but its nothing like comparing two (2) Variables and seeing the results fly by on the Terminal Screen exstreamly fast.
Need: Location of Execution speed of PBASIC commands for current and future projects.
Thanks for any help
Trying to find the "execution" speed of the PBASIC (GET/PUT) commands. Reason: I had to re-write some code in a SLOT and switched from Variables that was being re-used in certain routines and started using the (GET/PUT) Commands and GOSUB routines. Worked great, even had space left over (100 bytes)....GREAT.
But now that LOOP seems to be going almost 3,4 or more times slower. NOTE: I'm judging this by the DATA being printed on the DEBUG Terminal. Before I would add a PAUSE command to view the DATA on the Terminal. But now the PAUSE commands had to be removed.
The HELP file with the Editor does not give me the (GET/PUT) command "execution" speed.
Over all program still flows smoothly, but its nothing like comparing two (2) Variables and seeing the results fly by on the Terminal Screen exstreamly fast.
Need: Location of Execution speed of PBASIC commands for current and future projects.
Thanks for any help
Comments
http://emesystems.com/OLDSITE/BS2speed.htm
This is where the Stamp's big brother, the Propeller, really shines. It has a free-running counter than can be used to time bits of code. I do this all the time. It looks like this:
The variable called elapsed now holds the number of system ticks (usually 1/80,000,000th of a second) that elapsed while the code ran. The -544 part is removing the overhead used to capture the counter.