How true it is that .NET and Java programs are quite in-efficient when compared to C++?

The startup of managed .NET and Java programs is definitely slower
than the traditional C++ programs as it involves the hosting of CLR
into managed application process in .NET and starting the JVM in a new
process in case of Java. The execution also is a bit slower during the
initial period of program execution as the intermediate code is
translated to the machine code on the fly at runtime. But as the
program runs various parts repeatedly, the execution gets pace too.
Since, the CLR and JVM optimizes the code more efficiently than the
static C++ compilers, the execution speed of the program may actually
be faster after sometime of the program startup when most of the code
is translated. Hence, in the longer run, the .Net and Java based
programs should not be in-efficient when compared to C++. We used
'should' here as the actual performance depends on the particular
implementation and implementation strategy.

No comments:

Post a Comment