Click here to Skip to main content
15,894,017 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
loctrice3-Feb-16 2:59
professionalloctrice3-Feb-16 2:59 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
hal23x3-Feb-16 6:42
professionalhal23x3-Feb-16 6:42 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
Sharath Shetty3-Feb-16 6:47
Sharath Shetty3-Feb-16 6:47 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
Member 120239883-Feb-16 9:22
Member 120239883-Feb-16 9:22 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
Member 120239883-Feb-16 9:27
Member 120239883-Feb-16 9:27 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
sbcLion3-Feb-16 16:42
sbcLion3-Feb-16 16:42 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
Member 82246963-Feb-16 21:40
Member 82246963-Feb-16 21:40 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
jschell6-Feb-16 12:53
jschell6-Feb-16 12:53 
Muharrem B. wrote:
Everyone says c++ is faster than c#, why?


Because "everyone" doesn't know what they are talking about when then make a statement like that.

First of course in pantheon of programming speed is of small consequence. Microsoft, google and apple are not successful because of speed but rather because they make money. Businesses that don't make money do not last. And developers that think technology is more important than sales end up working for companies that don't make money.

Second of course there can be actual business reasons where 'speed' is important but in the vast, vast majority of cases actually producing speed is based on factors besides just code and language.

Third when in fact something needs to be faster it is experience not code that actually leads to faster solutions. Someone with years of experience is much more likely to produce a 'fast' system than someone without that experience regardless of technology choice. Keep in mind however that that is an average an not an absolute.

Fourth, benchmarks, which is what you have, is pretty much useless in determining speed as far as it means anything in the business world. They often reflect nothing but one small aspect of the language and platform on which they run. That is if they are down well. Poorly done they often reflect a misunderstanding of how languages, platforms and even benchmarks work. Very rarely they even reflect a biased attempt to achieve a specific result.

Fifth if one really wants to actually focus on professional programming then one should focus on understanding the basics on what it means to create a system and not language specifics.

Basic one would be to understand that performance is impacted in the following way
1. Requirements, most impact
2. Design (including explicit and implicit.)
3. platform
4. language least impact

Basic two would be to understand that if one wants to get more performance out of an application (not a system) and one can only focus on 4 in the above then one must do the following
1. Learn how to use an application profiler
2. Learn how to simulate real business data in the application
3. Run the profiler and determine where it might actually be possible to improve performance.

Focusing on 1/2 in the above can achieve orders of magnitude impacts on performance while 4 can only achieve marginal percentage increases.


After all of that my personal opinion is that if one had an unlimited amount of time, if there was an optimal design and requirements, if two programmers were very, very experienced with similar backgrounds in application design and the application was limited to a very narrow subset of functionality then it is possible that the C++ programmer might produce a solution that is marginally faster than the C# programmer.

But since that is a complete fantasy which has nothing to do with reality it is pointless to discuss it.
GeneralRe: Everyone says c++ is faster than c#, why? Pin
zezba90006-Feb-16 16:00
zezba90006-Feb-16 16:00 
GeneralRe: Everyone says c++ is faster than c#, why? Pin
pdohara10-Feb-16 3:58
pdohara10-Feb-16 3:58 
RantElephant. Sunshine. Telerik. PinPopular
Kornfeld Eliyahu Peter2-Feb-16 0:54
professionalKornfeld Eliyahu Peter2-Feb-16 0:54 
GeneralRe: Elephant. Sunshine. Telerik. PinPopular
OriginalGriff2-Feb-16 1:00
mveOriginalGriff2-Feb-16 1:00 
GeneralRe: Elephant. Sunshine. Telerik. Pin
F-ES Sitecore2-Feb-16 1:03
professionalF-ES Sitecore2-Feb-16 1:03 
GeneralRe: Elephant. Sunshine. Telerik. Pin
Kornfeld Eliyahu Peter2-Feb-16 1:08
professionalKornfeld Eliyahu Peter2-Feb-16 1:08 
GeneralRe: Elephant. Sunshine. Telerik. Pin
Jörgen Andersson2-Feb-16 2:29
professionalJörgen Andersson2-Feb-16 2:29 
JokeRe: Elephant. Sunshine. Telerik. Pin
Richard Deeming2-Feb-16 3:48
mveRichard Deeming2-Feb-16 3:48 
GeneralRe: Elephant. Sunshine. Telerik. Pin
Slacker0072-Feb-16 3:38
professionalSlacker0072-Feb-16 3:38 
GeneralRe: Elephant. Sunshine. Telerik. Pin
Dave Kreskowiak2-Feb-16 5:37
mveDave Kreskowiak2-Feb-16 5:37 
GeneralRe: Elephant. Sunshine. Telerik. Pin
Mycroft Holmes2-Feb-16 14:14
professionalMycroft Holmes2-Feb-16 14:14 
General102 years old and STILL going strong! PinPopular
Kornfeld Eliyahu Peter1-Feb-16 23:31
professionalKornfeld Eliyahu Peter1-Feb-16 23:31 
GeneralRe: 102 years old and STILL going strong! Pin
Daniel Pfeffer1-Feb-16 23:34
professionalDaniel Pfeffer1-Feb-16 23:34 
JokeRe: 102 years old and STILL going strong! Pin
User 110609791-Feb-16 23:47
User 110609791-Feb-16 23:47 
GeneralRe: 102 years old and STILL going strong! Pin
Kornfeld Eliyahu Peter2-Feb-16 0:19
professionalKornfeld Eliyahu Peter2-Feb-16 0:19 
GeneralRe: 102 years old and STILL going strong! Pin
den2k881-Feb-16 23:48
professionalden2k881-Feb-16 23:48 
GeneralRe: 102 years old and STILL going strong! Pin
Sander Rossel2-Feb-16 7:15
professionalSander Rossel2-Feb-16 7:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.