public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: stdc++ issue: extremely long compile time with large number of string literals
Date: Fri, 10 Jul 2020 23:27:27 -0700	[thread overview]
Message-ID: <CAC+QLdQtyHmGd0Uy3AtSUcuBnriYVgC-C7wZs1Sopm=1LUNb5A@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdTr=Hzx+yWbNhzy2R8Qk3dx_kSd1yy=1p_8OizZmWoabQ@mail.gmail.com>

>
> It's the array of std::string that the std::initializer_list refers to
> that causes the problem.
>
> In the faster code there is no array of std::string, it's an array of
> const char*. Initializing a const char* can't throw an exception, and
> destroying it is a no-op, so there's no exception handling code needed
> for the array.

Makes sense. Thanks for the explanation. I guess this is something to
keep in mind when using initializer_list with a large number of
non-trivial types.

-mandeep

      reply	other threads:[~2020-07-11  6:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 20:31 Mandeep Sandhu
2020-07-09 20:49 ` Marc Glisse
2020-07-09 21:27   ` Mandeep Sandhu
2020-07-09 23:49 ` Jonathan Wakely
     [not found]   ` <CAC+QLdRqjTe4YsUpQRcLG7tpxGda0oh6H788ORZa5MQR3NqRbw@mail.gmail.com>
     [not found]     ` <CAH6eHdTRiwA3t1K3okfVc+umPM8PJfbePaO7AHdLz+SYPOU9XQ@mail.gmail.com>
2020-07-10 19:36       ` Mandeep Sandhu
2020-07-10 20:25         ` Jonathan Wakely
2020-07-11  6:27           ` Mandeep Sandhu [this message]

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='CAC+QLdQtyHmGd0Uy3AtSUcuBnriYVgC-C7wZs1Sopm=1LUNb5A@mail.gmail.com' \
    --to=mandeepsandhu.chd@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jwakely.gcc@gmail.com \
    /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).