News for hackers. Stuff that matters.
Re:Which Programming Languages Use the Least Electricity? (2... by codesushi42 on Friday March 29, 2019 @09:17PM (#19526928)
This study is a bit silly, I had to check whether it was an April Fool's joke. The chipset running the instructions is going to have a far higher impact on energy usage than the language compiling those instructions.

For instance, switching to ASICs or even FPGAs that are optimized to handle certain types of computations.

Just look at datacenters or mobile devices. Sure, optimizations are made to runtime environments to improve performance, and increase battery life. But you are going to see bigger gains through chip architecture. And that is what vendors focus on.

Re:Which Programming Languages Use the Least Electricity? (2... by codesushi42 on Friday March 29, 2019 @09:41PM (#19527051)
To the naysayers: these languages are either compiled, or will be JIT'ed at runtime. What they will be compiled to will be chip specific binaries-- x86, ARM, whatever. The energy usage will be markedly different depending on which chip architecture is chosen, and will no doubt be inconsistent between different architectures and languages.

Or to put it another way. Why do you think mobile devices almost exclusively use ARM? Why do datacenter operators invest heavily in R&D for ASICs instead of engineering new languages or runtimes? Because languages play a secondary role in energy consumption.

This study is just like countless of other meaningless benchmarks seen in language war flame posts. Pointless and misses the big picture.

Re:Which Programming Languages Use the Least Electricity? (2... by Nvorzula on Saturday March 30, 2019 @01:26AM (#19527941)
With regard to datacenter operators, I would argue that a simpler answer to that observation is that they are investing heavily in the are in which they can actually effect change. That is, they can swap in-and-out their hardware, but language of choice is largely up to their customers - the dev. They can advocate and champion a particular language, but really enforcing it in any meaningful way is narrow casting their own user base.
Re:Which Programming Languages Use the Least Electricity? (2... by codesushi42 on Saturday March 30, 2019 @06:22AM (#19528723)
They could offer their own compilers or runtimes. Some big companies do. But most dollars and time is spent on hardware R&D and upgrades.

Facebook and Google both have in house chip designers these days, specifically for their data centers.

Re:Which Programming Languages Use the Least Electricity? (2... by ordu on Friday March 29, 2019 @10:08PM (#19527167)
How do you think, would the orders of languages (as listed in different tables in the article) change, if we repicated this study using other CPU?
Re:Which Programming Languages Use the Least Electricity? (2... by codesushi42 on Saturday March 30, 2019 @07:02AM (#19528831)
It is not about stack rank. Your measurements in joules is going to be affected by another variable which was omitted in your experiments! This type of omission would be pretty obvious spot in a scientific paper citing lab experiments.

You will see different energy outputs per language based on their compiled results depending on chipset architecture. And you will see different deltas between them; e.g. language x may use 10% more energy than language y on chipset A, but use 20% more energy on chipset B. And usage will vary depending on which kind of task is performed on which chip architecture, and with what language.

So you did a poor job setting your controls. The effect of the programming language was not well isolated in your benchmark trials, so setting chosen language as an independent variable is flawed. Who knows whether the overall ranking of languages would be affected had the benchmarks been done differently.