https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89121
--- Comment #2 from Marc Glisse <glisse at gcc dot gnu.org> --- If you write: auto mins = *std::min_element(f.begin(), f.end()); so that you ask for the value, the benchmark now says the perf is exactly the same for the 2 versions. I would close this as invalid.