From: Christoph Rippel Date: 2001-01-03T08:34:55+09:00 Subject: [ruby-talk:8548] Re: speedup of anagram finder > -----Original Message----- > From: Ben Tilly [mailto:ben_tilly@hotmail.com] > Sent: Tuesday, January 02, 2001 01:50 PM > To: ruby-talk ML > Subject: [ruby-talk:8543] Re: speedup of anagram finder ... > In theory, yes. In practice if you round reasonably, it will > work. Of course the more you round, the sooner you get to a > false positive. > I said the idea was sick? Sick but likely to work in a > practical situation. (That said, *I* would not want to rely > on such code in production...) Yes, but instead of rounding afterwards you might as well sum up ``good integer keys'' 1 <= asc2int[char] <= upper_bound like Barry's ``asc2log[char]''. In practice simply pick random numbers with an upper_bound around 2**29 and pray, or pick random numbers with an upper_bound around 2**58 if you are not the sloppy type. Christoph