[Mono-bugs] [Bug 41989][Wis] Changed - Volatile emit/use missing
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Mon, 28 Apr 2003 08:07:33 -0400 (EDT)
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 lupus@ximian.com.
http://bugzilla.ximian.com/show_bug.cgi?id=41989
--- shadow/41989 Sun Apr 27 13:24:31 2003
+++ shadow/41989.tmp.21029 Mon Apr 28 08:07:33 2003
@@ -1,14 +1,14 @@
Bug#: 41989
Product: Mono/MCS
Version: unspecified
-OS:
+OS: unknown
OS Details:
Status: NEW
Resolution:
-Severity:
+Severity: Unknown
Priority: Wishlist
Component: Misc
AssignedTo: mono-bugs@ximian.com
ReportedBy: miguel@ximian.com
QAContact: mono-bugs@ximian.com
TargetMilestone: ---
@@ -24,6 +24,21 @@
.field reqd [mscorlib]System.Runtime.CompilerServices.IsVolatile int32 a
Maybe we could store this information in the FieldAttributes (using an
unused bit there) for the time being, because using a dynamic invocation
for "IsVolatile" might be very expensive.
+
+------- Additional Comments From lupus@ximian.com 2003-04-28 08:07 -------
+The important thing when doing a dynamic call is to get the MethodInfo
+just once. For example, in a test case I wrote my !.13 GHz cpu can do
+10000 ctor invocations in 50 ms.
+I assume you need to do the call for each field acces: both corlib and
+mcs have about 11000 instructions to access fields: in this case the
+overhead in the compilation time would be less than 1 % doing the
+dynamic invocation.
+There is also one other thing to consider: it is very rare to access a
+field in some referenced assembly, so most of the time, mcs has all
+the info it needs in ModFlags and it doesn't need to do a dynamic call
+at all (it seems to do that already).
+So, since the operation turns out to be rare anyway, I'd go with the
+dynamic call. Let me know if my assumptions are wrong.