new wcwidth implementation (fast table-based)
authorRich Felker <dalias@aerifal.cx>
Tue, 24 Apr 2012 08:23:55 +0000 (04:23 -0400)
committerRich Felker <dalias@aerifal.cx>
Tue, 24 Apr 2012 08:23:55 +0000 (04:23 -0400)
i tried to go with improving the old binary-search-based algorithm,
but between growth in the number of ranges, bad performance, and lack
of confidence in the binary search code's stability under changes in
the table, i decided it was worth the extra 1.8k to have something
clean and maintainable.

also note that, like the alpha and punct tables, there's definitely
room to optimize the nonspacing/wide tables by overlapping subtables.
this is not a high priority, but i've begun looking into how to do it,
and i suspect the table sizes can be roughly halved. if that turns out
to be true, the new, fast, table-based implementation will be roughly
the same size as if i had just extended the old binary search one.


No differences found