Subject:
|
Re: Speed of RCX interpreting bytecodes: slow
|
Newsgroups:
|
lugnet.robotics.rcx
|
Date:
|
Wed, 5 Jan 2000 00:03:11 GMT
|
Viewed:
|
1441 times
|
| |
| |
In lugnet.robotics.rcx, Kekoa Proudfoot writes:
> Ben Jackson <ben@ben.com> wrote:
> > 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 16Mhz and claims to do simple adds
> > in 2 clocks...
>
> What is in a "counter loop iteration" ? Please share the NQC program you
> used to measure this with us. I fail to believe that a simple loop runs
> this slow. 16000 cycles per loop iteration does not sound right to me.
From memory, the NQC was:
int count;
task main()
{
count = 0;
CreateDatalog(100);
ClearTimer(Timer(0));
while (count <= 1024) {
if (count & 0xff == 0)
AddToDatalog(Timer(0));
count += 1;
}
}
The downloaded datalog will show the last log entry at around 100. You could
simplify this (just log one timer entry) but no matter how you slice it it's
VERY slow.
--Ben
|
|
Message is in Reply To:
| | Re: Speed of RCX interpreting bytecodes: slow
|
| (...) What is in a "counter loop iteration" ? Please share the NQC program you used to measure this with us. I fail to believe that a simple loop runs this slow. 16000 cycles per loop iteration does not sound right to me. -Kekoa (25 years ago, 4-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
|
|
|
|