News for hackers. Stuff that matters.
Re:Energy Efficiency Across Programming Languages by topspin on Friday September 15, 2017 @01:09AM (#15254799)
Two decades of optimization probably account for that. From the paper:

    Moreover, the top 5 languages that need less energy and
    time to execute the solutions are: C (57J, 2019ms), Rust (59J,
    2103ms), C++ (77J, 3155ms), Ada (98J, 3740ms), and Java
    (114J, 3821ms); of these, only Java is not compiled.
That is an admirable accomplishment. JRE 1.8 has the most efficient "managed" language runtime tested.

The PHP result is interesting; they used 7.x which is roughly twice as efficient as older (5.x) versions; PHP 7 was primarily a (successful) effort to improve performance. If you extrapolate the PHP result to the old version (multiply by 2) it's nearly as bad as Perl and among the slowest/most costly. That certainly corroborates Facebook's several PHP re-implementations.

Re:Energy Efficiency Across Programming Languages by jaawn on Friday September 15, 2017 @02:54PM (#15259712)
The Java performance was the most interesting part of the results for me. I'm glad it got some attention. I have been developing the opinion for awhile that, as an industry, we've become far too avoidant of "pre-mature" optimization. It is astonishing to me how much slower a lot of this stuff is than Java.

Granted, I also think considering Java to be "not compiled" is a slight misrepresentation since it does get compiled to Java bytecode.