To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 333
332  |  334
Subject: 
Re: Speed of RCX interpreting bytecodes: slow
Newsgroups: 
lugnet.robotics.rcx
Date: 
Sun, 2 Jan 2000 11:04:43 GMT
Viewed: 
1150 times
  
In lugnet.robotics.rcx, Ben Jackson writes:
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...

This is causing me to seriously consider legOS for the first time...
Yes.
It is important to realise, that the RCX, does not perhaps do the
interpretation in the way you think. In each 'loop', it executes one
instruction from each of the possible threads, and also reads the A-D's, on
each sensor, and updates to states for the motor outputs. There is a basic
'tick', used to go round this loop, and no matter how simple each instruction
is, it will still only execute one on each pass round the loop. Hence you will
only 'see' one instruction executed for each loop, rather than anything
approaching the speed of the H8 processor. This has both advantages and
disadvantages. The obvious disadvantage is the lack of speed (though for most
mechanical applications, this is adequate), but the advantage, is that all
threads receive the same priority. If you want to do something faster, you
have to look at other firmware. Though it is also worth realising that if you
did an interpreter that took the same approach on the PC (one
instruction/tick), the basic tick here is 18mSec, which doesn't make the RCX
look so bad in this context...

Best Wishes



Message has 1 Reply:
  Re: Speed of RCX interpreting bytecodes: slow
 
(...) Are you sure you mean each of the POSSIBLE threads? I did test to see whether it was slower to count to 1000 with another task running, and it was. Not half as fast, only about 30% slower. --Ben (25 years ago, 3-Jan-00, to lugnet.robotics.rcx)

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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR