Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77530 --- shadow/77530 2006-02-21 12:52:50.000000000 -0500 +++ shadow/77530.tmp.12786 2006-02-21 14:29:38.000000000 -0500 @@ -227,6 +227,25 @@ information already available in the Members array), but I trust your judgement on this. How should I proceed on this ? + +------- Additional Comments From [EMAIL PROTECTED] 2006-02-21 14:29 ------- +> Will that string[] in the generated code not be inlined anyway, or do +> you recon we should define it as a const variable in the generated +> method ? + +The array won't be inlined because it is a mutable object, so a new +instance will be created at every call. So yes, you need to generate a +static variable to cache it. + +> Also, I'm not convinced that caching any of these arrays in EnumMap +> is really worth the additional memory usage (as we have the same +> information already available in the Members array), but I trust your +> judgement on this. + +The additional memory usage is only for the array, since the strings +are shared. Creating the array over and over is far worse than +allocating the same array only once for ever. Not only for performance +but also to avoid memory fragmentation. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
