PDA

Click to See Complete Forum and Search --> : managed and unmanaged code


steve_rm
May 5th, 2003, 05:19 AM
Hello

first question
Which is faster managed or unmanaged code. C# and visual basic both use managed code, but with Visual C++ you get the choice of either creating a project with managed or unmanaged code. Is there any real difference in the speed and efficiency off managed and unmanaged.

Second question.
Both C# and visual basic use managed code. But as they are both using managed code, does that make the them equal in speed and efficiency.

Third and final question
If you create a project using visual C++ in unmanaged code, will this make a faster and efficient program than a C# or visual basic program

Many thanks in advance

Steve

Cander
May 5th, 2003, 09:28 AM
Unmangaed is faster because it doesnt use the .NET framework. Of course tha means you can no longer use any of the .NET debugging tools nor any of the .NET classes and objects.

hellswraith
May 5th, 2003, 11:14 AM
Originally posted by steve_rm
Hello

first question
Which is faster managed or unmanaged code. C# and visual basic both use managed code, but with Visual C++ you get the choice of either creating a project with managed or unmanaged code. Is there any real difference in the speed and efficiency off managed and unmanaged.

Second question.
Both C# and visual basic use managed code. But as they are both using managed code, does that make the them equal in speed and efficiency.

Third and final question
If you create a project using visual C++ in unmanaged code, will this make a faster and efficient program than a C# or visual basic program

Many thanks in advance

Steve
1. Unmanaged code will be faster, but as Cander says, you don't get all the great features the .net framework gives you. C# can run unmanaged code also if you want. You can even mix managed and unmanaged code (I haven't tested it, just read about it).

2. C# and VB are pretty much equal when it comes to speed and efficiency, yes.

3. It will be faster if you code it right... If you code a bad C++ program, it could be slower... For the most part, a knowledgable C++ programmer will turn out faster running code for sure.