+ 2
Why c++ is faster than c#
I have heard that c++ is faster than many others programming languages ( like C# ), but why ? Both are compiled so they must be same
3 Answers
+ 3
C# is similar to Java. They are compiled in a intermediate code, then the intermediate code is translate to machine code. For Java JVM, for C#. Net. Instead C++ is compiled directly in Machine Code. So C++ is "real" compiled language, Java and C#, not. This is why Java and C# have similar speed and are a lot of slower than C++ (for large projects).
+ 3
Both are compiled but C# is compiled into code for another runtime environment (. net) and c++ ist compiled into native code for a very specific processor architecture.
+ 2
so in c# there is another processing layer in between.