Subject:
|
Re: command framing as seen from kernel/program.lrkey_handler
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Sat, 1 Feb 2003 18:28:23 GMT
|
Viewed:
|
3857 times
|
| |
| |
"Pat LaVarre" <ppaatt@aol.com> wrote in message
news:H9n64q.B2p@lugnet.com...
> > > > ... brickos ...
> > > Sorry to see the source less online than: http://lxr.linux.no/source/
> >
> > Here's the link:
> > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/brickos/brickos/kernel/
>
> Cool, thanks. No grep, right?
I dunno, haven't found one yet, though.
> > there's no fast way to execute
> > log2() on the H8 (i.e. no O(1) solution)
>
> Mmmmm. I am curious, if that's ok.
>
> To get log2(xx) in O(1) time we could fetch (p[xx & -xx]) i.e. fetch our choice
> of the bytes at offset x 0 1 2 4 8 10 20 40 80 from some p we like.
Touché. Yes, tables, overlooked that.
> Merely standard C can't easily express that old idea without misleading the
> linker into wasting x81 - 9 bytes, which I gather would be considered expensive
> on an H8?
I think that smaller code size is preferable to faster execution speed
in this instance since this section of code would only get executed a
few dozen or so times per second (and then only when one is using
the remote).
Mark
|
|
Message has 1 Reply:
Message is in Reply To:
5 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
|
|
|
|