locked
Why the net platform uses more electricity than JVM? RRS feed

  • Question

  • Why the NET platform uses more electricity than JVM? I ask about it based on the article - Which Programming Languages Use the Least Electricity?

    • Edited by plepko1 Saturday, April 11, 2020 5:33 AM
    Saturday, April 11, 2020 5:29 AM

All replies

  • This is based on the number of CPU cycles required by a program to execute. The more CPU cycles, the more power will be used. So, why does a program written in .Net use more cycles than JVM? Well, no way to tell without examining the precise methodology that was used for the particular study from where you got that figure. One guess would be that the JIT-Compiler of .Net would be the one taking the additional cycles. However, if it is la long-running program, the additional saving of cycles produced by the optimised code generated by the JIT would ultimately offset the initial consumption of cycles for executing the JIT. So, depending on the type of program and how long it runs, it may well be that in the long term the .Net program ends up using less cycles than the one running in the JVM. A substantial amount of research would be needed to determine what is best depending on the particular circumstances for each piece of software.
    Saturday, April 11, 2020 8:58 AM
  • Java is both a language and a framework, both tied together and given one name.

    .NET is a platform that has many languages that use it - C#, VB.NET, F# and many more.

    The difference is one of naming and semantics, no more.
    Saturday, April 11, 2020 12:05 PM
  • Perhaps these measurements are out of date because Microsoft did many performance updates with .NET Core
    Saturday, April 11, 2020 12:27 PM