From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7A41C3833002; Wed, 18 Aug 2021 06:02:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A41C3833002 From: "dartdart26 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/101923] std::function's move ctor is slower than the copy one for empty source objects Date: Wed, 18 Aug 2021 06:02:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: dartdart26 at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED 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: bug_status resolution 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: Wed, 18 Aug 2021 06:02:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101923 Petar Ivanov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #9 from Petar Ivanov --- (In reply to CVS Commits from comment #8) > The master branch has been updated by Jonathan Wakely : >=20 > https://gcc.gnu.org/g:0808b0df9c4d31f4c362b9c85fb538b6aafcb517 >=20 > commit r12-2959-g0808b0df9c4d31f4c362b9c85fb538b6aafcb517 > Author: Jonathan Wakely > Date: Tue Aug 17 11:30:56 2021 +0100 >=20 > libstdc++: Optimize std::function move constructor [PR101923] >=20=20=20=20=20 Thank you! On ARM64, it is now identical to copy: ----------------------------------------------------- Benchmark Time CPU Iterations ----------------------------------------------------- copy 0.948 ns 0.948 ns 558822565 move 0.952 ns 0.952 ns 729210032=