From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20169 invoked by alias); 1 Aug 2014 15:27:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20088 invoked by uid 48); 1 Aug 2014 15:27:07 -0000 From: "lukeocamden at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/61909] Small function optimization not applied to small objects Date: Fri, 01 Aug 2014 15:27:00 -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: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: lukeocamden at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-08/txt/msg00055.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61909 --- Comment #2 from lukeocamden at gmail dot com --- (In reply to Jonathan Wakely from comment #1) > This is by design. I don't really follow - do you mean a consequence of the design, or does the standard mandate copying/moving the object into the heap, or does using the heap have some other benefit? > I have a patch to do the optimization a bit more aggressively, but still > only for trivially copyable types and others known to be location invariant > (which should include lambdas) That would be a great start - thanks very much!