gcc/libstdc++-v3/include
Paolo Carlini 4df9c41de5 Optimize locale::_M_impl->_M_names for the most common cases...
2004-05-03  Paolo Carlini  <pcarlini@suse.de>

	Optimize locale::_M_impl->_M_names for the most common cases:
	!_M_names[0] means unnamed; !_M_names[1] means all the categories
	the same name (_M_names[0] && _M_names[1] means that the full set
	of _M_names must be processed, the general case).
	* include/bits/locale_classes.h (locale::_Impl::_M_check_same_name):
	Tweak, saving work when !_M_names[1].
	(locale::locale(const locale&, _Facet*): Simplify: now just setting
	_M_names[0] = 0 means unnamed.
	* src/locale.cc (locale::operator==): Deal first with the common,
	easy cases, otherwise fall back to locale::name().
	(locale::name()): Tweak, if !_M_names[0] just return "*".
	(locale::_Impl::_Impl(const _Impl&, size_t): Tweak, early stop
	copying __imp._M_names if !__imp._M_names[0] or !__imp._M_names[1].
	* src/locale_init.cc (locale::_Impl::_Impl(size_t)): Tweak.
	* src/localename.cc (locale::_Impl::_Impl(const char*, size_t):
	Simplify when !std::strchr, just updating _M_names[0]; clean up.
	(locale::_Impl::_M_replace_categories): When !_M_names[1] prepare
	for the general case (full set of names), then do the usual work;
	clean up.

	* src/locale.cc (locale::name()): Reserve space in __ret.
	* src/locale_init.cc (locale::global(const locale&)): Save
	the name in a temporary.
	* src/localename.cc (locale::locale(const char*)): Reserve space
	in __str.

From-SVN: r81430
2004-05-03 12:14:07 +00:00
..
backward re PR libstdc++/14647 (bit_vectors are broken (regression)) 2004-03-19 06:54:40 -08:00
bits Optimize locale::_M_impl->_M_names for the most common cases... 2004-05-03 12:14:07 +00:00
c std_cctype.h, [...]: Remove trailing whitespace. 2003-12-09 04:41:52 +01:00
c_compatibility iso646.h, [...]: Remove trailing whitespace. 2003-12-09 04:51:46 +01:00
c_std re PR libstdc++/11706 (std::pow(T, int) implementation pessimizes code) 2004-03-11 10:42:26 +00:00
debug c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
ext Fixups for EDG front end. 2004-04-07 03:33:36 +00:00
std c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
Makefile.am allocator: New. 2004-03-13 06:54:25 +00:00
Makefile.in acinclude.m4 (GLIBCXX_CHECK_WCHAR_T_SUPPORT): Set LIBICONV, not libiconv. 2004-03-19 11:34:47 +00:00
stdc++.h