On Fri, Mar 22, 2002 at 12:03:08PM +0800, Anthony Fok wrote:
> On Thu, Mar 21, 2002 at 05:24:12PM -0800, Keith Packard wrote:
> > 
> > Around 5 o'clock on Mar 22, Anthony Fok wrote:
> > 
> > > But I do want to try a hash table first.  Now, if a hash table of size 2n
> > > (3302) or less with a good random function can accommodate these 1651
> > > characters with only a few collisions.
> > 
> > For a fixed dataset, you can generate a hash function that minimizes 
> > collisions.  xlib does this for keysym name->keysym translations.
> 
> Cool!  (Thanks for the info!)  Although this won't be needed unless X
> supports beyond BMP...  Or are you implying that this will come in handy
> when Xft is used to render fonts for the BIG5-HKSCS encoding?  Woohoo!  ;-)
> 
> And yeah, if Xlib already has this function, I don't have to go write one
> from scratch blindly (because I am new to hashing... ;-)  Thanks for the
> tip!  :-)

  You might also want to try GNU gperf, a perfect hash function generator. I
haven't used it personally, but AFAIK it's a good tool for this kind of
task.

-- 
Vasilis Vasaitis
[EMAIL PROTECTED]

"Don't do drugs. Santa Claus is watching."
                -- winamp.com


_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to