[Mono-list] Speed of MethodInfo.Invoke?
crj at lucubration.com
Fri Jan 27 14:27:34 EST 2006
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?
More information about the Mono-list