I need a somewhat large (thousands) set of strings, created once during
startup and never modified after.  What is a better choice, a (string,
unit) Hashtbl.t or the Set module?  If the Set module still uses trees
as it did when I was young :-), access will be logarithmic versus
constant for Hashtbl.  But on the other hand a hash function must
examine all of every string while the comparison of 2 strings stops at
the first nonmatching character.

I am thinking about the time to build the set as well as the probing
time.

-- 
Ian Zimmerman
gpg public key: 1024D/C6FF61AD
fingerprint: 66DC D68F 5C1B 4D71 2EE5  BD03 8A00 786C C6FF 61AD
Rule 420: All persons more than eight miles high to leave the court.

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to