Ternary Search Trees
bearophile
bearophileHUGS at lycos.com
Mon Apr 13 04:27:15 PDT 2009
Does someone has some need for Ternary Search Trees into Phobos (for D1. And eventually later for D2 too)?
TSTs allow to find keys, key prefixes, or even keys with holes. Keys are arrays of T, where T is the template type.
They can be designed to store the keys alone, or as an associative data structure.
With some benchmarks I have seen that a simple TST implementation is about as fast as the built-in AAs of D (but much slower than Python dicts).
Bye,
bearophile
More information about the Digitalmars-d
mailing list