Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Given that C++ is (mostly) as superset of C its not simply interesting its odd. Did they not simply give the C program to C++? Are they claiming that the C++ compiler compiles C programs to slower lower perf binary.


That's a good point. But then you're not benchmarking C++ as a distinct language. So what would sufficiently distinguish a C++ program from a C program? Let's assume it's not just minor incompatibilities introduced to prevent compilation by a C compiler.

There must have used some definition that is not explicit in the paper, but you can see in this code sample that the author used various C++ standard data types (std::string, std::array), iterators, classes, concurrency (std::thread). I'm no judge of C++ style, but perhaps it's "C++ as a C++ developer circa 1997 would have written it".

https://github.com/greensoftwarelab/Energy-Languages/blob/ma...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: