Subject:
|
Re: NQC versus Lego RCX Code Speed
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Fri, 6 Oct 2000 03:26:08 GMT
|
Original-From:
|
Steve Baker <SJBAKER1@nomorespamAIRMAIL.NET>
|
Reply-To:
|
SJBAKER1@AIRMAILsaynotospam.NET
|
Viewed:
|
630 times
|
| |
| |
"Wilcox, Doug" wrote:
>
> Hmm. This question seems to have gone the way of my PC-->IR Tower cable
> question.
As I understand it, the situation is this:
* Using the Windoze graphical environment - your 'programs' are translated
into a special 'byte-code' that's interpreted by the RCX's firmware.
* Using NQC, your C programs are translated into the same 'byte-code' and
interpreted by the exact same firmware on the RCX.
* Using LegOS and the *real* GNU C compiler, you get pure machine code
that doesn't have to be interpreted.
Hence, you would expect the very fastest performance to come from using
LegOS and a true optimising C compiler.
You *might* expect NQC and the Lego graphical programming environment to
produce similar levels of performance - but there is still the possibility
that NQC uses fewer bytecode instructions than the graphical programming
environment. That wouldn't suprise me because NQC seems to be very close
to the raw underlying bytecode - so it could easily be more optimal for
some (but perhaps not all) programs.
As for the other programming environments (Java, etc) - I have no idea.
> Let me try to get at the point that most interests me--what is the
> difference, at the RCX level, between programs coded in NQC and programs
> coded in RCX Code. Is the compiled NQC code closer to the "machine level"?
So the answer to this is "No - it's no closer - but it may still be faster".
To get closer to the machine level (and probably to have your programs run
at least 10 and perhaps 50 times faster), you should go to LegOS and GNU C.
However, the RCX bytecode with NQC seems pretty much 'fast enough' for
everything I've tried...things like switches and motors move a glacial
speeds compared to RCX bytecode...and NQC is just so convenient. Type
your program in, run NQC, press the RUN button. Action!
--
Steve Baker HomeEmail: <sjbaker1@airmail.net>
WorkEmail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sourceforge.net
http://tuxaqfh.sourceforge.net
http://tuxkart.sourceforge.net
http://prettypoly.sourceforge.net
|
|
Message has 1 Reply: | | Re: NQC versus Lego RCX Code Speed
|
| (...) This is correct. (...) Hehe :) Yes, this is correct. LegOS is also faster for some other reasons- it samples the sensors at a much faster rate than the standard firmware, so legOS programs can react much more quickly than standard bytecode (...) (24 years ago, 6-Oct-00, to lugnet.robotics)
|
Message is in Reply To:
| | RE: NQC versus Lego RCX Code Speed
|
| Hmm. This question seems to have gone the way of my PC-->IR Tower cable question. Let me try to get at the point that most interests me--what is the difference, at the RCX level, between programs coded in NQC and programs coded in RCX Code. Is the (...) (24 years ago, 5-Oct-00, to lugnet.robotics)
|
6 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
|
|
|
Active threads in Robotics
|
|
|
|