[Mono-devel-list] opcodes.c patch (GCCism)

Bernie Solomon bernard at ugs.com
Tue Aug 10 14:18:35 EDT 2004

Sorry to belabor this point... as it does all work.

I understood what the change is doing
and that it reduces startup time etc.

What I don't understand is why the change needs to use
the element array access form of initialization

    [ enum_member ] = offset,

and why


isn't enough as the enum members come in order
anyway. Not that it is a big deal but I was trying to
understand if I was missing something.

Thanks for the reference looks like it will have some
interesting stuff in it.

----- Original Message ----- 
From: "Paolo Molaro" <lupus at ximian.com>
To: <mono-devel-list at lists.ximian.com>
Sent: Tuesday, August 10, 2004 10:47 AM
Subject: Re: [Mono-devel-list] opcodes.c patch (GCCism)

> On 08/10/04 Bernie Solomon wrote:
> > However I am still slightly puzzled why this feature needs
> > to be used here at all given that the initialization happens
> > in order of enum member and those are just sequential
> > anyway. Removing the use of it seems to behave
> > identically to me. But things work for me now anyway.
> Storing addresses in arrays or structures requires relocations
> by the dynamic linker: that code avoids the relocations so it improves
> startup time and it reduces the amount of writable memory used.
> There are a few other places in mono where the optimization can be
> applied as well, I have other similar patches.
> Look at http://people.redhat.com/drepper/dsohowto.pdf for more details.
> lupus
> -- 
> -----------------------------------------------------------------
> lupus at debian.org                                     debian/rules
> lupus at ximian.com                             Monkeys do it better
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

More information about the Mono-devel-list mailing list