(none)

Peter Van Roy pvr at info.ucl.ac.be
Tue Apr 23 08:27:14 CEST 2002


> Hi
> I have a class for which i want to keep a list of items as one of the 
> private members. The items are subject to frequent changes, so i kept them 
> in a dictionary. Is there an overhead associated with extensive use of 
> dictionaries (noting that the dictionary contains a small number of 
> entries)? If so, can you please guide me as to what data structure i should 
> use instead, bearing efficiency in mind?
> Thank you.

Insertion/deletion/lookup on dictionaries takes constant amortized
time.  Dictionaries take up space proportional to the number of
entries (memory is recovered correctly upon deletion).
Dictionaries work well even for a very small number of entries.

Peter

-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.





More information about the mozart-users mailing list