[Bug libstdc++/59611] New: std::copy performs worse than naive implementation when copying a single known byte

gcc-bugzilla at contacts dot eelis.net gcc-bugzilla@gcc.gnu.org
Fri Dec 27 16:55:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59611

            Bug ID: 59611
           Summary: std::copy performs worse than naive implementation
                    when copying a single known byte
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugzilla at contacts dot eelis.net

Created attachment 31524
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31524&action=edit
Testcase

The attached testcase shows how using a naive implementation (mycopy) causes
gcc to generate better code than using std::copy.

(Clang /does/ generate optimal code when using std::copy in this case.)



More information about the Gcc-bugs mailing list