[Mono-list] Is there a mechanism to precompile a method?

Miguel de Icaza miguel@ximian.com
13 Sep 2002 16:15:45 -0400


Hello,

> I agree, reference counting would be a viable alternative. I just don't know 
> if and how cycle detection could be done efficiently (i.e. more efficient 
> than a gc run). 

Well, for one you keep pointers to all the objects that are being looked
for cycles in a special list, so it is a smaller set.  The paper goes
into more detail. 

> As a garbage collector would be needed, even when reference counting is used, 
> for defragmentation, and as only a small part of the data is really cyclic, I 
> think that it would be a good thing to use reference counting and gc 
> together. This would reduce the amount of work to do for the garbage 
> collector and make it faster. Doesn't the Python memory management work this 
> way?

You can already get "regular" GC with reference counting (that is the
disposing pattern documented).  But what I am suggesting here is that
the underlying GC instead of being the current conservative Boehm
becomes a reference-counting-with-cycles-detection one.  So refcounting
is done implicitly by the JIT for you.

> Too bad. Then it is your intention to keep the Boehm collector in forever? I 
> thought that it was just an intermediate solution.

We might use the Intel GC once it has been reworked to deal with value
types and reorganized, but currently there is no pressing need to do so.
Miguel.