[Mono-list] Speed of MethodInfo.Invoke?

Ben Maurer bmaurer at ximian.com
Fri Jan 27 13:56:18 EST 2006


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.

-- Ben



More information about the Mono-list mailing list