On Friday, 19 January 2018 at 19:33:28 UTC, H. S. Teoh wrote:
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.

Why would you need a default in a low-level construction? I think it naturally takes the tables with whatever was stored in there. There is no processing.

So the default has to be explicitly stored during building of trie.

So now the trie is returning the wrong value for certain dchar ranges. :-(




Reply via email to