Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jdh30@c...>
Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys

I just realised that we may all be using different defintions for the notion 
of time-complexity. My function performed "n" operations where "n" is the 
number of keys including duplicates. It may be possible to write a routine 
(which would need to be in Hashtbl, I think) which could do this in "n" 
operations where "n" is the number of unique keys (i.e. the size of the 
output list). I guess that was what the original poster meant. I suspect 
Hashtbl allows different keys in the same bin, so the actual number of 
operations will be somewhere between the two but could be made considerably 
faster than my external function.

I should also say that I have never had any need for this function. What do 
you guys use it for?

Cheers,
Jon.

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners