NBC speed
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
NBC speed
How fast does NBC code execute? Is it a fixed speed per line?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NBC speed
Depends on the operation.
It's a few thousand integer math operations per second, IIRC.
Linus did some great work, but it's lost with NXTasy.
(The topic was called "NXC performance insights", I believe.)
It's a few thousand integer math operations per second, IIRC.
Linus did some great work, but it's lost with NXTasy.
(The topic was called "NXC performance insights", I believe.)
Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE
Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NBC speed
Hmm, I was hoping for specifics.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NBC speed
Even though the fruitful discussion with John Hansen and others is lost, my benchmark programs are still there. The comments section at the top contains most of my original article from NXTasy:
http://www.mindstorms.rwth-aachen.de/tr ... ceChk1.nxc
http://www.mindstorms.rwth-aachen.de/tr ... ceChk2.nxc
http://www.mindstorms.rwth-aachen.de/tr ... ceChk3.nxc
http://www.mindstorms.rwth-aachen.de/tr ... ceChk4.nxc
Please note that the Firmware 1.2x seems to be about two times faster than the old 1.0x generation.
Please also note that this doesn't say anything about sensor or motor access, and that you always have to be careful when benchmarking and comparing results.
http://www.mindstorms.rwth-aachen.de/tr ... ceChk1.nxc
http://www.mindstorms.rwth-aachen.de/tr ... ceChk2.nxc
http://www.mindstorms.rwth-aachen.de/tr ... ceChk3.nxc
http://www.mindstorms.rwth-aachen.de/tr ... ceChk4.nxc
Please note that the Firmware 1.2x seems to be about two times faster than the old 1.0x generation.
Please also note that this doesn't say anything about sensor or motor access, and that you always have to be careful when benchmarking and comparing results.
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
Re: NBC speed
Oh and I remember one important thing that changed with Firmware 1.2x (or newer NXC versions), which is not yet mentioned in the comments of my Benchmarks: The Wait-command in NXC has changed from "busy waiting that burns CPU time" to a "real sleep, let other tasks use CPU".
RWTH - Mindstorms NXT Toolbox for MATLAB
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
state of the art in nxt remote control programming
http://www.mindstorms.rwth-aachen.de
MotorControl now also in Python, .net, and Mathematica
Re: NBC speed
Definitely not a fixed speed per line of code. Some opcodes take longer to execute than others. Some opcodes with one datatype for its parameters take longer than the same opcode with a different datatype. E.g., mov with byte array inputs will take longer than mov with signed long inputs. It is always best to reveal the hidden motivation behind the question, imho. Why did you hope for specifics about how fast NBC code executes on the NXT firmware?
John Hansen
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
http://bricxcc.sourceforge.net/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NBC speed
Thank you very much Linus.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: NBC speed
Okay, thanks John. I don't know all that much about how CPUs compute, but I though that if it was a fixed speed, I could do timing based on the number of OPCodes. I though maybe I could get higher resolution that CurrentTick gives.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: NBC speed
I think it is accurate to say that NXC only frees up the CPU during a wait if you are targetting the V1.28 (or higher) ENHANCED FIRMWARE. If NXC code is compiled for, and loaded onto, the standard firmware then I believe that you still get the busy wait.linusa wrote:Oh and I remember one important thing that changed with Firmware 1.2x (or newer NXC versions), which is not yet mentioned in the comments of my Benchmarks: The Wait-command in NXC has changed from "busy waiting that burns CPU time" to a "real sleep, let other tasks use CPU".
Ron.
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: NBC speed
So the obvious question is why do you need higher resolution then the timer gives you... What is it you are trying to do? If you explain the underlying problem someone may be able to help...
Who is online
Users browsing this forum: No registered users and 1 guest