From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14715 invoked by alias); 30 Sep 2014 06:25:04 -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 14311 invoked by uid 48); 30 Sep 2014 06:24:52 -0000 From: "piotrdz at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/62056] Long compile times with large tuples Date: Tue, 30 Sep 2014 06:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: piotrdz 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-09/txt/msg02734.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62056 --- Comment #5 from Piotr Dziwinski --- (In reply to Jonathan Wakely from comment #4) > tr1::tuple doesn't support perfect-forwarding or move semantics > > tr1::tuple doesn't support uses-allocator construction > > tr1::tuple doesn't support 'final' classes > > tr1::tuple doesn't have correct exception specifications > > tr1::tuple doesn't prevent implicit conversions that would use explicit > constructors > > tr1::tuple doesn't support tuple concatenation > > If you can add all those features to the implementation so that > it meets the C++11 requirements and it still compiles faster then I'd be > interested in your analysis of the remaining differences. Otherwise I'm > going to assume the difference is because the header contains more > than twice as many lines of code and several additional features. Ok, I understand it now. I was speaking from only somewhat experienced user perspective and I did not realise the deeper implications of standard compliance. Just for the record, I did some testing and found two important factors here are: - dependency to (to enable it in tuple concatenation) - (change in compile time 0.357s -> 0.231s), - allocator constructors - (change 0.231s -> 0.185s). So in the end please ignore my interruption with `std::tr1::tuple`. It seems the recursive version of `std::tuple` is not going to be optimized easily and the new flat implementation is the way to go here.