From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C32C3858C20; Mon, 28 Feb 2022 17:16:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C32C3858C20 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/104719] Use of `std::move` in libstdc++ leads to worsened debug performance Date: Mon, 28 Feb 2022 17:16:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: see_also Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2022 17:16:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104719 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D67906, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D81159, | |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D90428 | --- Comment #5 from Jonathan Wakely --- (In reply to Eric Gallager from comment #3) > Seems related to some of the requests for more warnings about uses of > std::move that might degrade performance, e.g. bug 67906, bug 81159, bug > 90428 >=20 > Also, Marek's blog post about std::move seems relevant here: > https://developers.redhat.com/blog/2019/04/12/understanding-when-not-to- > stdmove-in-c I don't think any of those are relevant, they're about *unnecessary* uses of std::move where that is either entirely redundant or doesn't change semanti= cs but prevents the optimizer doing better on its own. This is about *necessar= y* uses of std::move, and removing the move here would change semantics and potentially break the code. The request is to replace it with some kind of magic that does the same as std::move without actually writing std::move.=