Re: Re: LZ: jump tables vs. lookup tables (WAS: Re: LZ: my 2 frozen


[Prev][Next][Index][Thread]

Re: Re: LZ: jump tables vs. lookup tables (WAS: Re: LZ: my 2 frozen



Ben Shakal wrote:
   > 
   > Keith Burzinski wrote:
   > 
   [snip]
   > > 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).

The thing is, in order to be compatible with ZShell, Usgard _STILL_ 
has to have the lookup table, PLUS the routine to find the addresses in 
that table, so that routine is in there anyways!  This _REALLY_ wastes 
space!

~Michael Wyman
 wyma0012@tc.umn.edu