gcc/libstdc++-v3/src
Jonathan Wakely 749c0e1d8b PR libstdc++/59439 optimize uses of classic ("C") std::locale
The global locale::_Impl that represents the "C" locale is never
destroyed, so there is no need to keep track of reference count updates
for that object. This greatly reduce contention between threads that
refer to the classic locale. Since the global std::locale initially uses
the classic locale, this benefits the common case for any code using the
global locale, such as construction/destruction of iostream objects.

All these updates are done inside libstdc++.so so there's no need to
worry about users' objects having inlined old versions of the code which
still update the reference count for the classic locale.

	PR libstdc++/59439
	* src/c++98/locale.cc (locale::locale(const locale&)): Bypass
	reference count updates for the classic locale.
	(locale::~locale()): Likewise.
	(locale::operator=(const locale&)): Likewise.
	* src/c++98/locale_init.cc (locale::locale()): Likewise.
	(locale::global(const locale&)): Likewise.

From-SVN: r264811
2018-10-03 12:27:40 +01:00
..
c++11 re PR libstdc++/87135 ([C++17] unordered containers violate iterator validity requirements) 2018-09-21 20:39:07 +00:00
c++17 Fix single-threaded build for targets without atomics 2018-08-15 10:56:33 +01:00
c++98 PR libstdc++/59439 optimize uses of classic ("C") std::locale 2018-10-03 12:27:40 +01:00
filesystem PR libstdc++/87116 fix path::lexically_normal() handling of dot-dot 2018-08-28 16:33:53 +01:00
shared Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am Add new src/c++17 directory to list in acinclude.m4 2018-07-25 12:01:39 +01:00
Makefile.in Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00