[Mono-dev] Generic sharing: Good news, bad news, how to win big

Mark Probst mark.probst at gmail.com
Mon Apr 14 12:20:59 EDT 2008


On Mon, Apr 14, 2008 at 6:04 PM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
> Other thing, how does sharing and inlining play together? I guess inlined
> generic code
> uses rgctx a bit less as it has precise type information at hand. If so,
> wouldn't
>  more aggressively inlining generic code reduce the need for rgctx?

Yes, but the difference is negligible.  In FSharp the number of RGCTXs
that need to be creates goes down to 647 (from 651).  On the other
hand, more RGCTXs (most of which are of course never needed) are
allocated when code is inlined (i.e. more classes/vtables which
require RGCTXs are initialized).  I'm not quite sure why that is,
though.  It wouldn't be an issue when we do RGCTX allocation lazily
anyway.

I should also mention that we currently don't allow inlining in shared
code, for the simple reason that it's not implemented yet.

Mark


More information about the Mono-devel-list mailing list