-
September 29th, 2009, 02:23 AM
#1
Difference in performance between CSharp and C++
Is there any difference in performance between CSharp and C++ if I am writing network programming in these two language??
-
September 29th, 2009, 02:30 AM
#2
Re: Difference in performance between CSharp and C++
Yes. There's also a difference between two apps written in C++.
Will you notice or care? An educated guess would say "probably not".
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
September 30th, 2009, 03:15 AM
#3
Re: Difference in performance between CSharp and C++
for me this feature that c++ allows default arguments on function parameters is good also.
Please rate my post if it was helpful for you. Java, C#, C++, PHP, ASP.NET
SQL Server, MySQL
DirectX
MATH Touraj Ebrahimi
[toraj_e] [at] [yahoo] [dot] [com]
-
September 30th, 2009, 06:16 AM
#4
Re: Difference in performance between CSharp and C++
I think C++ is more faster in performance than C# as it does not contain more graphics and other framework libraries that .NET provide you...
-
September 30th, 2009, 07:34 AM
#5
Re: Difference in performance between CSharp and C++
Originally Posted by vcdebugger
I think C++ is more faster in performance than C# as it does not contain more graphics and other framework libraries that .NET provide you...
The quantity of pre-written libraries which are available to use has no affect on performance.
http://blogs.msdn.com/ricom/archive/...10/416151.aspx
Read the entire article. It's an implementation of a chinese-english dictionary in C++ and C#. C# gave better performance for a *lot* less coding effort. After serious (unmaintainable) optimisations were applied to the C++ version, it was able to complete the task in 80ms whereas the initial C# version completed in 120ms or so. The slightly optimised C# version could complete the task in < 100ms.
Moral of the story. No single language is 'fastest'. It all depends on the algorithms you use.
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
September 30th, 2009, 10:27 AM
#6
Re: Difference in performance between CSharp and C++
It's like asking "which car is better". The end result will always come down to the driver
It's not a bug, it's a feature!
-
September 30th, 2009, 10:35 AM
#7
Re: Difference in performance between CSharp and C++
Originally Posted by foamy
It's like asking "which car is better". The end result will always come down to the driver
That's a much better way of putting it
www.monotorrent.com For all your .NET bittorrent needs
NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.
-
September 30th, 2009, 11:37 AM
#8
Re: Difference in performance between CSharp and C++
Just as an aside...
C# apps will always have a slightly longer startup time, but the JIT compiler can apply optimizations for the machine that the application is currently being run on. The C++ compiler has to be far more general because it compiles the program to native code, so it has to run (practically) anywhere. Like the others have said, anyone who says something like "C++ is faster than C#" doesn't know what they are talking about, and in your case it would likely not even matter if one were slightly faster than the other.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|