Re: WHy is C# so much slower than c++???
- From: "Bruno van Dooren [MVP VC++]" <bruno_nos_pam_van_dooren@xxxxxxxxxxx>
- Date: Thu, 2 Nov 2006 08:37:09 +0100
This makes the times 12.6 secs for C++ and 15-16 seconds for C#.
Much more reasonable.
I suspect there was an underflow/overflow situation and the C++ code
stopped executing.
Still C# is still ~ 20% slower than C++. Managed C++ too!
Hi,
enable the optimizer in your C# project settings. It is disabled by default.
Then the C++.NET and C# results should be nearly identical.
Native C++ will probably a bit faster dues to lower memory overhead.
For more accurate timing you should use the StopWatch class, and not include
the Console.WriteLine statements in your time measurements. That will give
you ms accuracy or better.
As far as switching to C# goes: from personal experience I can say that
application development times and debugging times are much shorted in C#
than in native C++ or even C++.NET.
YMMV.
--
Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"
.
- Follow-Ups:
- Re: WHy is C# so much slower than c++???
- From: Shawn B.
- Re: WHy is C# so much slower than c++???
- References:
- WHy is C# so much slower than c++???
- From: jimocz
- Re: WHy is C# so much slower than c++???
- From: jimocz
- WHy is C# so much slower than c++???
- Prev by Date: Re: Huge Floating Point Error
- Next by Date: Re: question related to sockets
- Previous by thread: Re: WHy is C# so much slower than c++???
- Next by thread: Re: WHy is C# so much slower than c++???
- Index(es):