Making generalized Trie type in D
Roman D. Boiko
rb at d-coding.com
Mon Jun 11 05:11:10 PDT 2012
On Tuesday, 5 June 2012 at 13:27:12 UTC, Roman D. Boiko wrote:
> maybe it is better to avoid immutability... or do bulk ins /del
> before copy.
Would it be difficult to introduce two optimizations:
* have strings of all lengths above configurable threshold go to
the same bucket (is it reasonable?)
* have ability to store a checkpoint, then do a series of
modifications, and store another checkpoint but reuse data which
have not been affected.
For the second optimization a possible design would be to store
internal state as snapshot + diffs, and apply diffs when creating
another snapshot. Diff format should allow efficiently performing
trie interface operations.
More information about the Digitalmars-d
mailing list