> >> IDEAS: I would probably replace the children > OrderedCollection with a tail+next circular linked list > representation. At the beginning tail := nil, if it is not nil > the head is accessible with tail next. Inserting at the tail > is easy. All can be encapsulated into #childrenDo: of course, > and it saves a slot compared to head+tail+next. Consider that > the OrderedCollection also costs two slots (one slot for the OC > instance variable and one slot in the OC itself) so you'll save > memory for the empty OC slots (probably like 100 bytes per > element, totalling ~6 MB). > > For the attributes dictionary, reusing the RBSmallDictionary > > What is the difference between LookupTable and RBSmallDIctionary? What > would be the more appropriate, and in which cases?
RBSmallDictionary gives up hashing, and just does a linear search over an OrderedCollection. LookupTable is the same as a Dictionary, but it doesn't use Associations and this makes it use less memory. Paolo _______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
