public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "piotrdz at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-62056-4-I0JbQRu98x@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62056-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62056

--- Comment #5 from Piotr Dziwinski <piotrdz at gmail dot com> ---
(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 <tr1/tuple> 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 <tuple> 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 <array> (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.


  parent reply	other threads:[~2014-09-30  6:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 20:05 [Bug libstdc++/62056] New: " kaballo86 at hotmail dot com
2014-09-29  8:36 ` [Bug libstdc++/62056] " redi at gcc dot gnu.org
2014-09-29 14:21 ` [Bug c++/62056] " piotrdz at gmail dot com
2014-09-30  6:25 ` piotrdz at gmail dot com [this message]
2014-09-30 13:34 ` kaballo86 at hotmail dot com
2014-09-30 17:38 ` manu at gcc dot gnu.org
2014-09-30 20:20 ` kaballo86 at hotmail dot com
2014-10-01 20:35 ` manu at gcc dot gnu.org
2014-10-01 20:47 ` [Bug libstdc++/62056] " redi at gcc dot gnu.org
2014-10-01 23:36 ` manu at gcc dot gnu.org
2014-10-02  8:54 ` redi at gcc dot gnu.org
2014-10-07 11:25 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-62056-4-I0JbQRu98x@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).