From: John S. <sk...@oz...> - 2003-06-17 02:54:23
|
I finally managed to get hold of the archive. If you want to make me a developer I can contribute to the documentation. Comments. DynArray.make size null: makes an array of length zero, with size element slots initialised by null. Can't you initialise the empty slots with Obj.magic(0)? I don't want to put an element here. I may not have a convenient default, and even if I do it is going to kill performance compared to an integer, since there will be a bogus pointer for the collector to chase down. Also, I haven't checked the collector header, but isn't there a count field that can be used for the count without compromising the allocator's knowledge of the length of a block? [The size may be needed for disposal and/or movement on compaction] If there is, the store can be totally uninitialised, which is even more efficient. -- John Max Skaller, mailto:sk...@oz... snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia. voice:61-2-9660-0850 |