Re: [PATCH] console UTF-8 fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 12, 2007 at 02:13:06PM +0100, Alan Cox wrote:

> You can pack them a little differently and they'll shrink a lot.

The smaller table would actually slightly grow instead of shrinking. In my
patch there are 11 intervals, each consume 2*4 bytes, that's 88 bytes. Your
variant would store each interval in 3 bytes, that's 33 bytes so far, plus
you need 4 byte values in the toptab array, that's 64 more bytes.

The larger table is 984 byte large now (123 intervals). You cannot compress
each interval to 3 bytes (at least not the way you described) since the
index for toptab needs more than 16 possible values. But it's easily
possible to compresss each interval in 4 bytes. That's 492 bytes for the
intervals themselves, plus at least 64 bytes for toptab (oh, probably it's
possible to store 3 byte values in toptab, too).

You might gain approx. 400 bytes in a table that's actually commented out in
the current patch since HPA doesn't like the behavior where it would be
used. On the other hand, you get a database that is harder to understand,
maintain, verify, you get code that runs a little bit slower. We're from
different worlds. You're a great kernel hacker and bit-magician. I'm rather
developing applications, so for me having a less straightforward code to
save 400 bytes is simply not worth it.

Which version would fit in the spirit of the kernel better? I don't know,
I'd let you decide it :)


bye,
Egmont
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux