public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "antoshkka at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/59439] std::locale uses atomic instructions on construction
Date: Sun, 20 Apr 2014 08:33:00 -0000 [thread overview]
Message-ID: <bug-59439-4-4FZGVlloxY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59439-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59439
Antony Polukhin <antoshkka at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |antoshkka at gmail dot com
--- Comment #7 from Antony Polukhin <antoshkka at gmail dot com> ---
(In reply to Jonathan Wakely from comment #5)
> There's a good reason boost::lexical_cast is special-cased for the common
> int-to-string conversions that don't need fancy formatting.
I'm the current maintainer of boost::lexical_cast and I'd like to add my 2
cetns.
Construction of std::locale is a common case all around the Boost libraries.
Here are some of the cases when std::locale is constructed:
* in almost any conversion with boost::lexical_cast
* in all the string related algorithms in Boost.Algorithm (like compare(),
erase(), find() and others)
* in methods of Boost.Locale like to_upper, to_lower, normalize and others...
* in parsers of Boost.PropertyTree
In most cases I've seen only the global 'C' locale is used in user code, so
optimizing it's construction/descruction/copying will have a good impact on
code performance.
prev parent reply other threads:[~2014-04-20 8:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 21:56 [Bug libstdc++/59439] New: " ben.maurer at gmail dot com
2013-12-09 21:59 ` [Bug libstdc++/59439] " ben.maurer at gmail dot com
2013-12-09 23:55 ` pinskia at gcc dot gnu.org
2013-12-10 0:39 ` ben.maurer at gmail dot com
2013-12-10 0:54 ` ben.maurer at gmail dot com
2013-12-10 23:59 ` redi at gcc dot gnu.org
2013-12-11 0:23 ` ben.maurer at gmail dot com
2014-04-20 8:33 ` antoshkka at gmail dot com [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=bug-59439-4-4FZGVlloxY@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).