views:

101

answers:

3

In reality, I am trying to create a control showing price depths of a stock which needs to accept a large number of messages and summarizing them for display purposes. Will I get a better result if I create it in MFC and use that control in my .Net Winform application than writing the whole thing in .NET?

+2  A: 

The short answer is yes, BUT... The extra time and hassle it will take to write a control in C++ rather than using .Net will not be worth it. If used correctly, .Net is highly performant and C++ if/when used poorly will be a slug.

Paul Sasik
+4  A: 

I would write the whole thing in .NET, profile if it's too slow, then if it is, port only the processing code to C++ and use P/Invoke to get the summarized results for a .NET control. Trying to interface an MFC control with .NET can take a long time and be prone to error, whereas if you write the display logic in .NET and use C++ for any very performance dependent code you'll have a much easier time.

Ron Warholic
+2  A: 

Have to take into account the overhead for switching to unmanaged code as well. Make it in c# first. IF it is too slow and you can't optimize the c# then look at going to c++.

nportelli