Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2004-04-23 (21:35)
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?


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: