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=81663 --- shadow/81663 2007-05-25 10:39:11.000000000 -0400 +++ shadow/81663.tmp.1566 2007-05-25 17:57:47.000000000 -0400 @@ -200,6 +200,29 @@ is virtual, but the type is static, so we should use a direct call. This optimization should benefit also all the other such cases. ------- Additional Comments From [EMAIL PROTECTED] 2007-05-25 10:39 ------- I was always wondering how hard and efficient it can be to implement sealed class { virtual method } optimization. + +------- Additional Comments From [EMAIL PROTECTED] 2007-05-25 17:57 ------- +I posted a patch to mono-dev with the sealed class/method virtual +dispatch optimization. This resulted in a very small improvement for +ipy 2.0, only 4%. + +The GC overhead is justifiable since ipy 2.0 allocates a lot more +memory than 1.1. + +Another solution to optimize delegate dispatch is to allow the runtime +to violate the sealed flag and generate two specialized sub-classes of +the delegate. For instance methods, just put the target method in the +vtable and for static methods fix the stack and statically dispatch +and return. + +For the simple case, the cost of calling a delegate would be the same +of a virtual-method. + +This would require a very intrusive patch, since there are quite a few +places that check (method->klass->parent == +mono_defaults.multicastdelegate_class). + + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
