On Thu, Mar 21, 2002 at 09:28:13PM +1100, Roger So wrote:
> > I am not too happy that the U+20021..U+2F9D4 to Big5-HKSCS mapping
> > takes up so much space (nearly 70 KB for just 1651 entries) because of
> > the sparse array.  Anyhow, BIG5HKSCS.so grew from 115165 bytes to
> > 185240 bytes here.  Not a big deal, but even the big GB18030.so is only
> > 130356 bytes...  :-) I am thinking of using a hash instead for that
> > area, but that'll be an experiment for another day.  Fun stuff!  :-)
> 
> Heh.  Still better than the giant "switch ... case ... case ..." block
> that I first thought of. :)

Hehe, I simply inherited the "from_ucs4_idx" index table that was originally
in big5hkscs.c.  Did you wrote that, or Ulrich did?  :-)

> Or perhaps you can have a sorted mapping table with which you can do a
> binary search on.

Hey, that's another neat idea!  I never thought of that.  :-)  With 1651
entries, it would take at most 11 tries?  (Just a rough guess of 2^10 =
1024, 2^11 = 2048; I'm too sleepy to do the real math... :-)  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....  I wonder if a binary search or a hash is faster in
this case.  Oh well, fun stuff nevertheless.  :-)

Cheers,

Anthony (zzZZZzzzZZZ)

-- 
Anthony Fok Tung-Ling
ThizLinux Laboratory   <[EMAIL PROTECTED]> http://www.thizlinux.com/
Debian Chinese Project <[EMAIL PROTECTED]>       http://www.debian.org/intl/zh/
Come visit Our Lady of Victory Camp!           http://www.olvc.ab.ca/
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to