Proposed Phobos equivalent of wcswidth()

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jan 19 19:33:28 UTC 2018


On Thu, Jan 18, 2018 at 06:42:26PM +0000, Dmitry Olshansky via Digitalmars-d wrote:
[...]
> Also forgot to mention that can pass BitPacked!(ubyte,2) to Trie
> template as value type to use 2 bit per value. Should reduce your
> width table 4-fold.  Just saying;)

Thanks for the tip!  Indeed, the table size was reduced 4-fold.
Awesome.

However, now I'm finding that it no longer works properly when loaded
from the precompiled data.  It appears to have something to do with the
default value for the width table being 1 rather than ubyte.init, and so
far I couldn't figure out how to get the Trie ctor that takes .offsets,
.sizes, .data to specify a default value.  So now the trie is returning
the wrong value for certain dchar ranges. :-(


T

-- 
Some ideas are so stupid that only intellectuals could believe them. -- George Orwell


More information about the Digitalmars-d mailing list