Software written in Java/C#/etc wastes energy
by Alan West, November 2006.
Although this seems extreme, its very real, I have observed services deployed written in a language compiled as byte-code, requiring four physical servers, just to process the equivalent load that one server with software re-written in C/C++ turned out to be capable of. In this case its not at all difficult to imagine the energy savings involved.
Compared to software compiled for a native processor, the cost savings in reduced development times when writing software in languages which compile to virtual machine byte-code, surely results in increased running costs year upon year due to the extra energy, and resources those virtual machines often demand.
Reduced development times in these newer languages, is largely due to the inclusion of an extensive standard library. Better tools for managing the source code of projects can help reduce development time, especially with large projects. Those features for reducing development time should apply to any language, including C/C++.
Wasted doing what?
I believe a major factor that degrades the performance is the automatic garbage collection. It is always employed in these systems, they never appear to properly release memory back to the system, but instead rely on the operating system to swap the unused chunks of memory to disk, wasting time and energy for no good reason.
Software compiled for a particular processor target is ready to execute right away. Software compiled in to a kind of byte-code isn't executable, and is either interpreted by a virtual machine, or compiled to native instructions just-in-time when required, so wasting time and energy, and more time and energy when attempting optimisations. It could certainly reduce that which is wasted by saving native code compiled from byte-code for future use, but that is at the expense of extra disk space, and further control/checking mechanisms to determine if the saved image is out of date. With each new mechanism, further possible points of failure are introduced.