To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 17656
17655  |  17657
Subject: 
Re: Light Sensor help
Newsgroups: 
lugnet.robotics
Date: 
Tue, 9 Apr 2002 17:13:36 GMT
Viewed: 
669 times
  
I am posting this to the general robotics newsgroup (I hope)

How often is the light sensor value updated?  Is there anything I can do to
speed it up?

The answer to this bit is easy - the RCX reads the sensors once every 3 mS
under the Lego firmware. (I have no idea what the LegOS kernel does.)

The purpose of this post however, is to ask if anyone has done any timing
tests to find out what the byte code execution speeds are recently. Easy
enough to do, set up an empty loop that goes round say 10,000 times and time
it with a stop watch, and then insert different instructions into the loop
and check out how much longer the overall time increases by.

I'd like to think that someone has already done this before, but I can't
seem to find a post anywhere and if it's that old, it probably wasn't on
vers 2.0 firmware.

It might be very insightful to know just how slow the interpreter is. I have
a nasty feeling that the effective code execution speed of NQC programs is
really slow.

JB

(If I had a spare evening or two and a stopwatch I'd volunteer myself, but
things are keeping me rather busy at the mo.)



Message has 1 Reply:
  Re: Light Sensor help
 
(...) Yes, I just recently did some timing tests, using that exact method. Each bytecode takes 2.9 +/- .2 ms to execute, as near as I can tell. This appears to be independent of which bytecode it is (though I did not test any that I really expected (...) (23 years ago, 9-Apr-02, to lugnet.robotics)

9 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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