Conclusions
Thus, as we have seen, .NET 2.0 won 2 out of the 3 major tests – clearly besting Java 1.5 in both execution speed and real-world memory efficiency. Java did, however, manage to hold its own in the native types memory comparison by a pretty wide margin. This indicates that on the whole .NET is a more efficient platform, with perhaps at least one area for improvement – native type memory efficiency.
So now that we have seen that .NET is more efficient by what appears to be a constant factor, the question remains – does it matter? The fact is that, despite the many advantages offered by managed code platforms like .NET and Java, most applications are still written in C++/COM. Consider the following random list of popular applications:
- Microsoft Office
- Internet Explorer
- iTunes
- Windows Media Player
- FireFox
- Photoshop
These applications are almost completely C++ and COM – no managed code. So it’s pretty clear that companies and organizations that have invested heavily in an existing code base are not about to throw that code out the window. However, .NET and to a limited extent, Java, can interoperate with existing code and many new features and addons to popular existing software, such as those listed above, are being implemented in managed code.
Clearly, a big part of this industry-wide transition towards managed code will hinge on improvements in execution speed and memory efficiency – specifically in Java and .NET.
It appears that Microsoft .NET has not only caught up to Java in many ways, but it has surpassed it in terms of implementation efficiency. This is not surprising since Microsoft continues to prosper while Sun appears to be in a slow decline as businesses move away from expensive, proprietary systems. This is not to say that Java should be discarded completely, but we have a clear efficiency champion in .NET.