News for hackers. Stuff that matters.
Re:Sustainability with Rust by AshamedCaptain on Saturday February 12, 2022 @02:06PM (#30315332)
> . 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.

Re:Sustainability with Rust by scottlamb on Saturday February 12, 2022 @07:38PM (#30317874)
Yes, 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...
Re:Sustainability with Rust by igouy on Monday February 14, 2022 @01:17PM (#30335744)
> 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.

Re:Sustainability with Rust by igouy on Saturday February 12, 2022 @03:01PM (#30315805)
> 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