Subject:
|
RE: Speed of RCX interpreting bytecodes: slow
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Sat, 1 Jan 2000 22:34:48 GMT
|
Viewed:
|
1374 times
|
| |
| |
> Working on the barcode scanner I decided to see just how fast the RCX
> could loop. A simple NQC program can do about 1000 counter loop iterations in
> about 100 ticks, or 1 iteration/ms. This is shockingly slow. The native
> H8/329 is clocked at 16Mhz and claims to do simple adds in 2 clocks...
>
> This is causing me to seriously consider legOS for the first time...
OK, I did some basic timing experiments....for pbForth.
: TEST1 10000 0 DO LOOP ; \ This is a hard loop of 10000 iterations
: TEST2 10000 0 DO I DROP LOOP ; \ Same loop except the loop index is put on the
\ stack and dropped - a no-op essentially
: OUT1 20 0 DO TEST1 LOOP ; \ 20 iterations of TEST1
: OUT2 20 0 DO TEST2 LOOP ; \ 20 iterations of TEST2
OUT1 took about 2 seconds for a total of 200,000 hard loop iterations
OUT2 took about 15 seconds for a total of 200,000 loop iterations with simple stuff
I could do more stuff in the loop...it would slow down.
The basic information here is that you get about 100,000 hard loops per second. Not
too bad. Even when you load down the loop (albeit lightly at this point) the rate
is still pretty high.
Considering that the sensors get updated every 3 msec, that leaves LOTS of time to
do things even at the limit of sampling.
Now do want to try pbForth?
Cheers,
Ralph Hempel - P.Eng
--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to: rhempel at bmts dot com
--------------------------------------------------------
|
|
Message is in Reply To:
| | Speed of RCX interpreting bytecodes: slow
|
| While working on the barcode scanner I decided to see just how fast the RCX could loop. A simple NQC program can do about 1000 counter loop iterations in about 100 ticks, or 1 iteration/ms. This is shockingly slow. The native H8/329 is clocked at (...) (25 years ago, 1-Jan-00, to lugnet.robotics.rcx)
|
11 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|