C# performance with unmanaged code

R

Ryan Taylor

Hello.

I will be developing an application shortly and a concern I have is the
performance regarding C# code calling unmanaged COM components. Does anyone
have any performance metrics for using unmanaged COM/ActiveX components with
managed C# code?

Thanks in advance.
Ryan
 
L

Lionel LASKE

Microsoft say: "approximate overhead for a COM interop call: 50 machine
instructions" (see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/manunmancode.asp)

You can yourself measure overhead with some standard .NET CLR performance
counter, see
http://msdn.microsoft.com/library/d...nref/html/gngrfinteropperformancecounters.asp

For some other related links see
http://www.codeproject.com/dotnet/primenumbersprojects.asp or
http://library.theserverside.com/detail/RES/1051711830_396.html.

Lionel.
 
A

Amit Bahree

What exactly are you going to be interoping to and how much? Also, how
much data are you going to be marshalling across?
 
R

Ryan Taylor

Sorry for the late reply.

I will be using a COM component for communicating with a hardware device
attached to the PC via an ethernet port. The approximate amount of data to
transfer is 140 bytes. I will need to transfer this 140 bytes no more
frequent than 500 ms. All the information should be ints and doubles. No
strings or fancy datatypes will be transferred to my knowledge.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top