Irene Langkilde Geary wrote:
Thanks! This is what I wanted to know. It is especially helpful to understand that having records with different arities can have an impact.

How much space does each arity structure take?

That's a (usually small) hash table, which maps each field name to an index. It's very reasonable, in fact. Note that in the case of tuples, the arity is just a number (the tuple's width).

The only problem with arities is that the current implementation does not garbage collect them. This is why we recommend to avoid creating records with operations like Adjoin, etc. If record arities are very dynamic in your program, it is safer to use dictionaries, which are plain hash tables (and gc'ed).

Cheers,
raph
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to