Quantifying the Performance of Garbage Collection vs. Explicit

renoX renosky at free.fr
Tue Mar 18 02:08:52 PDT 2008


Dan Wrote:
> In fact, causing all pointers and array {ptr,length} structs to be colocated where possible in a program would *dramatically* improve GC performance as only a few pages would ever need to be brought into cache during a GC phase - the same that would probably already be in cache during normal program operation.

The question is if the 'where possible' is that big if you have an array of objects which contain pointers, then it isn't possible to colocate them with pointers..

Note that many allocators sort objects by their size so an array {ptr,length} and its data would be usually on different pages already.
  
About the typing issue, yes having strong typing help a lot a GC, but this would imply that interoperability with C would have to use a JNI-like system instead of the easy linking that we have now as C is weakly typed..

Regards,
renoX



More information about the Digitalmars-d mailing list