0
Reply

C# vs C++ speed issue

James Dwulit

James Dwulit

Nov 2 2006 5:31 PM
2.3k
Hi all, I recently multiplied 30 billion numbers with C# and C++ -- unoptimized compiling yielded c# in 81 seconds and C++ in 120 seconds (VS 2005 compiler used) However when I optimize C# with the mouse click in properties in the build menu of the VS compiler and select C++ speed optimization I get the following times: C# 61 seconds C++ 45 seconds Is the VS 2005 C++ optimization really that much better than C#? I was surprised to see c# faster in unoptimized code. I was under the impession C++ was always faster. Anybody have any anecdotal stories? I am debating of switching to C# but speed issues are always in the back of my mind. Jimocz