3 ms·
> . It’s benchmarking N different programs written in M languages (where M<N) that satisfy a given challenge, not the same program ported to N languages. And u
by AshamedCaptain 5y ago
> . It’s benchmarking N different programs written in M languages (where M<N) that satisfy a given challenge, not the same program ported to N languages.
And using K different standard libraries. Otherwise I can't explain that they put C on a different result as C++, considering they are often the same compiler (and not just the same backend). Probably, it is benchmarking stdio vs iostreams or the like, which is interesting.
- igouy 5y ago> Otherwise I can't explain… They provided the source code of their programs and makefiles. There's no need for guessing games — https://github.com/greensoftwarelab/Energy-Languages https://github.com/greensoftwarelab/Energy-Languages
- scottlamb 5y agoYes, iirc the Game's maintainer has some rules about idiomatic code. They might mean that if a language has a hash map built into its std library, you can't supply your own. C++'s std::unordered_map is infamously bad (as compared to e.g. absl::flat_hash_map) so that hurts. C has almost no useful library or idioms. In normal circumstances, I consider that a disadvantage, but in this case it may mean you write your own more optimal code and achieve a better score...
- igouy 5y ago> might mean None of the current 3 C++ programs use `std::unordered_map` they use `assoc_container.hpp`. The current C program uses `khash.h`. Someone who was interested in evaluating "Energy Efficiency across Programming Languages" would have to look at the authors public code archive and understand what they did.