> it won’t be idiomatic
I just looked at the first example:
C: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
C++: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
The C++ doesn’t use shared_ptr or STL or anything, and isn’t that far from the C code, but it isn’t that close either. I wonder if it’s OMP configuration that’s causing it to be slower, or maybe just instruction cache or something since the C++ is larger.
The results say this one has C++ going 50% slower. I’m a little skeptical it’s the compiler’s or the language’s fault. I’d speculate it might have more to do with how the program is written.