Re: LZ: jump tables vs. lookup tables (WAS: Re: LZ: my 2 frozen
[Prev][Next][Index][Thread]
Re: LZ: jump tables vs. lookup tables (WAS: Re: LZ: my 2 frozen
Keith Burzinski wrote:
> This isn't really an RE, but, late last night I put USG and the
> CoolShell on my calc. Yeah, i liked the appearence, and it was
> organized, but I'm still not happy with the 2K+ kernel. The libs
> are nice and all, but we need a better way to impliment them (I
> think).
>
> MUCH earlier on (before I even tried it), I had just looked over the
> orginal 85b in a HEX editor. (I wanted to find some ROM info... ;)
> anyway, what I found was a series of addrs preceded by "C3"s...
> indicating one thing: JUMP TABLES!!! Do you all know how
> size-inefficient that is??? VERY!!! yeah, it is _faster_, but MUCH
> larger! Especially with all the new (44?) ROM calls they added.
> HA!
What are they so much larger than, lookup tables? It seems to me
that you still need to store the actual address to jump to, just
without the C3's. So if you did that, you would save, according to
your estimate, 44 bytes, one for each ROM call. And that doesn't
include the code needed to actually calculate the lookup table
offset. So it doesn't sound like you are really saving a huge amount
of space with lookup tables, and because of the significant time
savings of a jump table, I think it is worth the extra few bytes (not
even 44). (BTW, in CShell, how many bytes of code does it take to
perform the lookup? Just curious.)
Just my $0.01...
Ben Shakal
shakalb98@jhs.net
shakal@ns.net
Quote of the Month: "Despite the high cost of living, it remains popular."
Follow-Ups: