From: notsaying@nospicedham.invalid.org   
      
   On Mon, 12 Nov 2018 09:31:29 GMT, "wolfgang kern"    
   wrote:   
      
   > Kerr-Mudd,John wrote:   
   > ...   
   >> Yes, thanks. Keyword noted!   
   >:)   
   >   
   >>> I could never see where there the gain of "hashing" actually is.   
   >>> Fast_Find can be achieved with SORT and/or INDEX-tables, shorten   
   >>> a list by compression (ie: to 6 bit ASCII) might help too.   
   >   
   >> It was to have a smaller text part, and avoid the chaining that   
   >> FORTH uses for it's keyword search. But Terje has shown that I was   
   >> over-optimistic to naively think I could have about half of 64k   
   >> unique words. I suppose, if I'm resigned to 32bits for a hash, I   
   >> could instead use the MS shortfilename approach of "SPAC" "SPA~1"   
   >> etc as shortened versions of SPACE and SPACES, but I'm going off   
   >> the whole thing now.   
   >   
   > ASCII-quads are a good choice, also within (66's) 16-bit code.   
   > But "spaceship" and "spaceshit" would collide twice,   
   > kinda a mess in space then :)   
   >   
   > If your 350 words fit into 64K then what would be wrong by having   
   > their unique 16-bit ID as an address offset into a list segment ?   
   >   
   Wasteful? I'm trying to save (max 31 byte) text strings!   
      
   > what I use for keywords/errormsg/helptxt/.. :   
   > all lists are sorted and every entry is preceded by two bytes.   
   > the first byte hold the string size (00=> max=256).   
   > the second byte contain my text-type and decoration flags.   
   >   
   > So a search can easy walk through even the entries show different   
   > length and type.   
      
   From what I can tell that (count prefix+flags) is embedded in most/all   
   FORTHs.   
      
   > I also have a tag-list that contain all the offsets of my strings,   
   > and I can use an ordinal (error#, help-ID,..) for print or display.   
      
   I could do that. But I don't want to even store codeword strings.   
      
      
   I've found an unique coding for those 350 (std+extra FORTH) words. So I'm   
   back on track.   
      
   Thanks.   
      
   > __   
   > wolfgang   
   >   
      
      
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|