public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Benjamin Kosnik <bkoz@redhat.com>
To: ljrittle@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/7445: poor performance of std::locale::classic() in multi-threaded applications
Date: Fri, 09 Aug 2002 02:26:00 -0000	[thread overview]
Message-ID: <20020809062601.7623.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/7445; it has been noted by GNATS.

From: Benjamin Kosnik <bkoz@redhat.com>
To: Loren James Rittle <rittle@latour.rsch.comm.mot.com>
Cc: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
   gcc-prs@gcc.gnu.org, ljrittle@gcc.gnu.org, shurik@sequoiap.com
Subject: Re: libstdc++/7445: poor performance of std::locale::classic() in multi-threaded applications
Date: Thu, 8 Aug 2002 23:18:57 -0700

 > OK, I'd be happy to find a performance fix that doesn't make the
 > library code subtly less portable when we have a test case.  A
 > reference to code already in our test suite would be acceptable.
 
 Yeah. This is kind of all hand-wavy at this point.
 
 > Benjamin (as the "local locale" expert), is it *always* true that
 > std::locale::classic() is called at least once during startup before
 > control is transferred to main()?  If so (and will always be so), then
 > all thread-related locking could be removed IMHO.  In practice, our
 > implementation of the Standard C++ library (with optional threading
 > support) already supposes that no thread which uses the library
 > implementation may have ever been started before main() is invoked.
 > If not true, then this change would make a very hard to detect
 > threading bug when the assumption changes.
 
 This is true. I would think the lock could then be removed? I'll let you
 figure out what to do with current sources. Thanks for the help.
 
 -benjamin


             reply	other threads:[~2002-08-09  6:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-09  2:26 Benjamin Kosnik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-19 18:31 ljrittle
2002-11-19 18:27 bkoz
2002-11-19 18:16 Alex Kompel
2002-11-19 12:46 Benjamin Kosnik
2002-11-19 12:46 Alex Kompel
2002-11-19 12:31 bkoz
2002-08-08 23:26 Loren James Rittle
2002-08-08 17:06 bkoz
2002-08-02  9:25 bkoz
2002-07-31 12:35 bkoz
2002-07-30 11:46 shurik

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=20020809062601.7623.qmail@sources.redhat.com \
    --to=bkoz@redhat.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=ljrittle@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).