This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/78180] Poor optimization of std::array on gcc 4.8/5.4/6.2 as compared to simple raw array
- From: "barry.revzin at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Nov 2016 22:00:33 +0000
- Subject: [Bug c++/78180] Poor optimization of std::array on gcc 4.8/5.4/6.2 as compared to simple raw array
- Auto-submitted: auto-generated
- References: <bug-78180-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78180
--- Comment #1 from Barry Revzin <barry.revzin at gmail dot com> ---
Upon further investigation, all of the difference is in benchmark comes from
the initialization of the raw array versus std::array. For some reason, in the
two examples, the two containers are initialized differently - and this
propagates down to using different registers throughout the rest of the
benchmark.