Subject:
|
RE: What do these macros do? [IOMAP Access Execution Times
|
Newsgroups:
|
lugnet.robotics.nxt, lugnet.robotics
|
Date:
|
Sun, 21 Jan 2007 12:20:40 GMT
|
Reply-To:
|
<DICKSWAN@SBCGLOBAL.stopspamNET>
|
Viewed:
|
1292 times
|
| |
| |
> Jeff Elliott wrote:
>
> My experience with the IOMAP calls is that they're pretty slow - it
> must be doing some costly address lookup each time?
>
> <<snip>>
>
> I guess I should do some time trials to test this theory out :)
You're right. IOMapRead and IOMapWrite are very slow functions. They're
slow because you pass a character string for the name of the module you
want to access; the NXT-G firmware runs through the list of modules
looking for a match on the name as part of the read/write process. The
search algorithm is not a simple string compare; it has to avoid letter
case (upper and lower case are treated the same) and also accommodate
wildcards in the search.
My testing indicated that read/write of IOMaps via NXT-G firmware takes
about 450 microseconds for the "UI" module and about 320 microseconds
for the "Display" module via NXT-G opcodes. The difference between the
two is position in the search order (11 of 11 or 4 of 11). About 150
microseconds of this time is setting up parameters for the read/write
operation and the rest is performing the read/write "system call".
In addition, the IOMAP access functions limit you to messages under 64
bytes. This may be a fantom only restriction.
You might want to explore some of the alternative programming
environments that are likely to provide lower level, and more efficient
access, to the display bytes.
|
|
Message is in Reply To:
| | Re: What do these macros do?
|
| (...) Thanks for your response, John. That tip about the dirty flag not being IOMAPpable is very, very useful; I could have wasted a lot of time working that out the hard way. I'm working on a graphical display widget to show a 'radar' (well, sonar) (...) (18 years ago, 21-Jan-07, to lugnet.robotics.nxt, lugnet.robotics)
|
12 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in...
NXT programmable brick
Robotics
|
|
|
|