What does HackerNews think of Energy-Languages?
The complete set of tools for energy consumption analysis of programming languages, using Computer Language Benchmark Game
We're comparing averages, why would we bother so much about the cause of an outlier.
> you linked directly to the C++ code for spectral-norm
You had linked to the wrong C and C++ code for spectral-norm, I linked to the code that was actually used.
> The time ratio of the Benchmarks Game fastest C version to the slowest C++ version is over 16x.
Again, you seem to be looking at the wrong repo.
The authors of "Energy Efficiency across Programming Languages, SLE’17" provided this repo —
From looking at the code snippets, a big issue with this study becomes clear - it doesn't reflect how languages like Python are used in practice.
In practice, the "hot loops" of Python are in c/c++/fortran/cython/numba/... i.e. Python code usually makes use of a vast ecosystem of optimized science/maths/data science libraries. Whereas the study code is mainly using pure Python.
It's an issue with the methodology that the programs are written specifically for this study; creating an artificial situation.
> It's based on these 4 year old programs —https://github.com/greensoftwarelab/Energy-Languages
Yes, that repo's blurb confirms what I said: "The complete set of tools for energy consumption analysis of programming languages, using Computer Language Benchmark Game"
If you were making some other point, I missed it. As for the programs being four years old, the paper was published in 2017, so that's exactly as expected...
> > … no one bothered to cp fast-solution.js fast-solution.ts.
> Perhaps figuring out correct type annotations was too much of a barrier.
Sure, the details don't interest me. The point is that these two languages with identical compilers (TypeScript gets translated to JavaScript, discarding you're annotations) show wildly different scores, which makes it impossible to take any of these numbers too seriously.
They provided the source code of their programs and makefiles. There's no need for guessing games —