Click to See Complete Forum and Search --> : [RESOLVED] C# vs Managed C++
falconsoft
June 21st, 2006, 12:18 AM
Hi,
I have programmed in C++ before .NET came and then switched to C# and liked the language. What I would like to explore is whether I have missed anything in not programming in Managed C++.
Putting it more specifically-
1) Performance related : Do managed applications written in Managed C++ run faster than the same application written in C#?
2) Feature set : Is there any useful features in Managed C++ which are not available in C#?
It would be nice if the Microsoft people share their thoughts on this.
Thanks,
- Manoj Agarwal
steixeira
June 21st, 2006, 03:10 AM
>>1) Performance related : Do managed applications written in Managed C++ run faster than the same application written in C#?<<
Managed code written in C++/CLI does tend to perform better than similar code written in C#, as the C++ compiler's optimization technology is more sophisticated. However, your mileage will certainly vary depending on the specific scenario.
>>2) Feature set : Is there any useful features in Managed C++ which are not available in C#?<<
Templates and deterministic finalization are two biggies, but the ability to seamlessly interoperate with native code is perhaps the most compelling feature.
Thanks,
Steve Teixeira
Group Program Manager
Visual C++
falconsoft
June 22nd, 2006, 02:22 AM
Thanks for your reply Steve!
About feature set- I thought C++ templates are the same as generics which C# 2.0 has. Also, do you really have deterministic finalization in managed C++? I thought the CLR doesn't support deterministic finalization.
About performance : Can you give links to any bench mark studies done for comparing the performances? I ask as this question (about performance between C# and C++) is always troubling me and I would like to explore it.
Steve- can you pl elobrate on above.
Thanks,
- Manoj
Brad Jones
June 22nd, 2006, 08:37 AM
Here are a couple of articles on the Codeguru site that I thought I'd mention since they relate to this thread:
Comparing .NET Generics and C++ Templates
http://www.codeguru.com/columns/experts/article.php/c7423/
STL.NET: Combining Generics and Templates
http://www.codeguru.com/columns/kate/article.php/c10297/
Brad!
Nemanja Trifunovic
June 22nd, 2006, 09:17 AM
And one from Brandon Bray on the same topic:
http://blogs.msdn.com/branbray/archive/2003/11/19/51023.aspx
codeguru.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.