[Mono-list] Speed of MethodInfo.Invoke?

Scott Willeke scott at willeke.com
Sat Jan 28 13:50:08 EST 2006


You might be interested article at the link below. This is posted as a 
CLR specific, but I think the concepts still applicable to Mono. In 
fact, if somebody here can explain, I would be interested to know just 
what the differences related to this article are between the CLR and  Mono.

http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx


Chad Robinson wrote:
> Ben Maurer wrote:
>> On Fri, 2006-01-27 at 08:50 -0500, Chad Robinson wrote:
>>
>>> I have a question about Mono internals (or CLR internals?). How is 
>>> MethodInfo.Invoke actually implemented? I'm trying to write an 
>>> extensible application that would support loading custom modules in 
>>> external DLLs. However, the application is also tightly performance 
>>> constrained. I guess what I'm asking is, what is the overhead like 
>>> for invoking a method discovered through MethodInfo (assume I 
>>> discover in advance, assume 2-3 object ref params) vs. a traditional 
>>> call?
>>
>>
>> The fastest way is through a delegate, which takes care of argument
>> binding for you.
>
> How do I use a delegate to call into a function that I don't even know 
> exists until I load the assembly and call MethodInfo.GetMethod?
>
> Regards,
> Chad
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>


More information about the Mono-list mailing list