Managed C# versus Unmanaged C++
This article is going to run some performance tests against C# and C++. I think it has become generally accepted that Visual C++ is the best, if not, one of the best performance compilers on the Win32 platform. Many developers have approached the dotNet community with questions as to the performance of unmanaged C++ on Win32 versus managed C# in dotNet.
I think I should begin by explaining my development environment. The environmental details are that I’ve got a Dell Inspiron 3800 G700GT notebook that is slightly over one year old. I have Windows 2000 with SP2, Visual Studio.NET and the dotNet platform. All the tests are performed with command-line executables that were compiled in release mode and run from the command prompt, not the Visual Studio IDE. These are the results right out of the box. No optimizations. Optimizations to the C++ or the C# compilers might produce different results and this might be a subject for a further article. I plan on running four different tests. Some of them are classic performance test (Sieves) and others are solely because I want to test the performance of a specific item in the dotNet framework.
…
Hello World
The Hello World test programs measure the amount of time that it takes to load a program and its run-time environment. In the case of C++, that’s the C run-time library and pretty lightweight. In C#, the dotNet framework must be loaded, which arguable is not as lightweight.
…
Website: www.kbcafe.com | Filesize: 59kb
No of Page(s): 9
Click here to download Managed C# versus Unmanaged C++.
Related Tutorial
Tags: comparison, compiler, managed, performance, unmanaged, unmanaged code
Comments
Leave a Reply