home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,670 of 4,675   
   Kerr-Mudd,John to notsaying@nospicedham.invalid.org   
   Re: DJB2   
   11 Nov 18 16:10:05   
   
   From: notsaying@nospicedham.invalid.org   
      
   On Sun, 11 Nov 2018 11:07:19 GMT, "Kerr-Mudd,John"   
    wrote:   
      
   > On Sun, 11 Nov 2018 05:37:00 GMT, Rod Pemberton   
   >  wrote:   
   >   
   >> On Sat, 10 Nov 2018 12:39:48 +0100   
   >> "R.Wieser"  wrote:   
   >>   
   >>> The problem is that you have degraded the hash to an 8-bit value,   
   >>   
   >> You really can't "degrade" the original hash much as it's terrible.   
   >>   
   >> The problem is that ASCII text has insufficient randomness in it's   
   >> bits to generate good hash values (i.e., low collisions) from such an   
   >> algorithm.  The only solutions are a) increase the randomness of the   
   >> input to distribute the hash values more evenly across the hash   
   >> domain, or b) increase the size of the hash space, e.g., 16-bit to   
   >> 32-bit.   
   >>   
   >> I tested about 50 hash functions with brute-force text input about a   
   >> decade ago (comp.lang.misc):   
   >>   
   >> https://groups.google.com/d/msg/comp.lang.misc/z4dQK8qYhPQ/-5dbeexBcaM   
   >> J (Usenet msg-id hd69d5$umo$1@aioe.org)   
   >>   
   >>   
   >> Rod Pemberton   
   >   
   > Thanks for that; I'm not looking to have uniqueness over the entire   
   > ASCII (or even all Cap letters combinations); what I'm looking for is   
   > a keyword compression algorithm; I'm thinking of replacing FORTH's   
   > existing counted-Word followed by code with a lookup table of hashed   
   > keyword-to- code-entry. No need to store the actual Word literal.   
   >   
   > But I get 2 collisions from a 350 Word dictionary using DJB2 (if my   
   > hash code is working correctly), when there's 64k combinations!?   
   > Something's amiss.   
   >   
   >   
      
   Nope "U." and "TO" give 7568   
   also   
   "RP!" and "RETURN-STACK-CELLS" give 1A28   
      
   darn it.   
      
   --   
   Bah, and indeed, Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca