views:

829

answers:

3
+1  Q: 

MFC vs. CLR?

In a visual studio C++ project, would MFC be faster than using the CLR? I'd specificily be using 2008.

Oh and the reason I ask is because I have experience with .NET but not so much with MFC. I understand what MFC is but have never really used it much.

+1  A: 

If you are talking about a Visual C++ project with /clr enabled, then definitely one without /clr will be faster. However, a Visual C++ project without /clr can be outrun by a Visual C# project in some cases(some cases: not all of them) mainly because of the optimizations that can be done at the CLR layer.

Aamir
Thank you - I think you've covered my question with the most detail.
Frank V
+1  A: 

In that case, I can say - work with what you know.
.net (winforms) is not lesser compared to MFC (unless you are doing something that requires platform support).

shahkalpesh
+3  A: 

If you're referring to dev time, if you have experience with .NET and the runtime environment requirements are not a concern, you're probably better off doing a CLR project of some sort. MFC has a fairly steep learning curve, and .NET experience is fairly easy to translate cross-language.

If you're talking about runtime speed, MFC (native code) will almost certainly be faster.

Nick
I'm looking at what would run faster.
Frank V
Although, Visual C++ .NET has some pretty weird syntax extensions. :)
BobbyShaftoe