Yeah so the 12x gap in regex-redux is measuring the speed of two completely different libraries, and obviously boost is what’s slow. It’s not a language difference, nor even primarily an issue with means vs medians. The issue with regex-redux is slightly more of comparing apples to oranges.
I assume you’re referring to regex-redux, but I was confused for a minute there because you linked directly to the C++ code for spectral-norm, not regex-redux, and spectral-norm doesn’t include a regex lib. I had to go looking around for the includes you’re talking about, and the Benchmarks-Game version has multiple C++ entries. There are C++ entries that use pcre, re2, and boost/regex. The C entries all use pcre except the winner, who uses pcre2.
> For a single outlier (regex-redux) there's a 12x difference between the measured times of the selected C and C++ programs.
BTW, I dont know exactly what they’re referring to there. The time ratio of the Benchmarks Game fastest C version to the slowest C++ version is over 16x. The ratios in the SLE paper of energy and run time are a bit lower than 12 but they also have only one sample, and it uses boost, so I don’t see why regex-redux with boost is useful in any perf or energy comparison other than to serve as a mild warning about using boost.
There happens to be a ratio of almost exactly 12x between the slowest C++ version (g++#3 boost) and the fastest C++ version (g++#6 - pcre2). That’s C++ vs C++. Maybe that’s what they were talking about, or maybe the perf numbers have changed out from under the commentary.
The ratio of times of the fastest C to the fastest C++ time with regex-redux is 1.4x and they both use pcre2. That seems like a more reasonable place to start.