Re: minimizing the cost of managed/unmanaged collaboration

Alan Baljeu <[email protected]> Wed, 28 Mar 2007 17:02:00 -0400
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <019b01c7717c$54225cd0$1dc80ac6@CTI>
Hi Shawn, thanks for your input.  You wrote:

> The cost of moving code from unmanaged to managed can be
> significant and I do not mean to minimize that fact, but did
> want to address your statement
> that:
>
>   "...isn't possible to go completely to managed code.  As
> speed is an issue..."
>
> There is *not* a blank rule of thumb that says you are losing
> performance for services by writing managed code.

You are right.  I should not have implied otherwise.

> It really
> depends on the nature of your application on whether C++ is
> faster.  More to the point, is the marshaling performance
> going to outweigh any performance benefits of keeping code in
> C++. In fact, in certain cases managed code can simply out-perform
> C++ code (memory allocation is a good example of this).

I agree.

> I do not suggest that you take the advice of any (or all) of
> us on this list as the final arbiter because we cannot gleam
> the specifics of a complex system by trading e-mails in this
> way.

You are right again.  But I was hoping someone could give me advice on how I could
investigate the issue myself.  As I said in the beginning, I have no idea whether
marshalling costs me 10s or 2min.  Here's my original question:

> How can I understand the costs involved in this transfer,
> and how can I minimize these costs?

My question, especially the first part, remains unanswered.

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com