[Mono-dev] Managed DirectX
joncham at gmail.com
Thu Oct 26 13:05:32 EDT 2006
If you're asking about the performance of the current COM Interop
implementation, I don't have many answers. It has not been optimized at all
currently. A brief benchmark showed COM Interop on mono running at about 5x
slower than on .Net. I'm sure that will get better if I spend some time
working on that (but I'd rather get some other features working first). I
don't know how this compares to the icall example you posted.
Remember though, there is a lot of stuff that goes on beyond emitting a
calli instruction. Proper reference counting, type marshalling, casting/QI,
preserving identity, etc. Right now, a COM Interop call involves the
overhead of an equivalent pinvoke call, plus some other stuff for mapping
managed call signature to COM signature, reference counting, retrieving
function pointer from vtable at call time, preserving identity of Runtime
Callable Wrappers (so each COM object is only represented by one managed
On 10/26/06, Brian Crowell <mono-devel at fluggo.com> wrote:
> Jon Chambers wrote:
> > interop assemblies. If you want to try anything out on mono, you will
> > need to build you interop assemblies with .Net (either by hand or via
> > tlbimp). If you need any other help let me know.
> All right, I went back and found the COM import examples in the .NET
> documentation. I had read this stuff once, but I hadn't ever tried it out.
> Managed to get an IDirect3D9 interface definition working in pure C#.
> That lends some possibility to doing the whole thing in C#. *Now* my
> question is how this performs. How do runtime-callable-wrappers perform,
> compared to doing the icall shown in the previous IL listing?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list