Peter Gibbs wrote:

> I have been looking at other areas for improvements. 
> Arrays seem to be one such area, ...


Yep


> This is using a singly linked list of variable sized chunks,
> without a separate index array. Each chunk is created
> with a minimum size (4 entries at present), then doubled
> in size until a maximum size (1024) is reached; further
> expansion creates a new chunk.  


Did you look at indexed access, shift, unshift, splice ;-)


> In addition, the mark_used function in dod has been
> changed to not add PMCs to the next_for_GC list if
> they do not need further processing (i.e. none of the
> is_PMC_ptr, is_buffer_ptr or custom_mark flags
> is set) 


This would give a good patch for CVS too.

> Finally, the number of used PMCs within each arena
> is counted during the marking phase, and arenas
> with used = allocated are skipped during the free
> phase; 


This would make sense for many small arenas. With current 256 objects 
per arena, I makes only sense for objects, which allocate 512 or more in 
one go - but yes why not.


> Incidentally, while testing the latest version of grey
> I encountered a problem due to intlist's chunk_list,
> which is a second buffer header embedded within
> a bufferlike header. 


Such things need a custom destroy method, which we need anyway.


leo




Reply via email to