To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxtOpen lugnet.robotics.nxt in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / 286
285  |  287
Subject: 
NXT Optimized Array Handling
Newsgroups: 
lugnet.robotics.nxt
Date: 
Thu, 28 Dec 2006 22:10:08 GMT
Viewed: 
11646 times
  
There doesn't seem to be any information on the most memory-efficient or
speed-effecient way to handle arrays in the NXT Executable File
Specification. For example, if you want to create a multi-dimensional array,
you use the opcode OP_ARRBUILD (arrbuild in NBC). However, you must create
the single-dimension arrays first and then OP_ARRBUILD appears to copy them
to a new, contiguous memory location. This effectively doubles the amount of
memory used!

Also, operations can be performed that change the size of an array (like
OP_ARRSUBSET). You could increase or decrease the size of the array with
this command. How does the NXT firmware handle this? Is new space created
and old space freed via some sort of heap management?

Knowing how the firmware handles this would aid in writing efficient
programs. I suppose I could wade through the firmware code, but I was hoping
someone would know the answers.

David Wallace



Message has 1 Reply:
  RE: NXT Optimized Array Handling
 
I would suggest that the easiest way to understand how standard firmware handles arrays is to go to the NI web site and do a search on something like "efficient LabVIEW memory management" which will result in a nice description of how LabVIEW (...) (18 years ago, 30-Dec-06, to lugnet.robotics.nxt)

3 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