gcc/libstdc++-v3/src
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
..
Makefile.am c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
Makefile.in c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
allocator-inst.cc Makefile.am (bits_headers): Remove allocator_traits.h. 2004-01-29 00:18:40 +00:00
allocator.cc acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Add pool_allocator. 2004-03-22 13:07:13 +00:00
codecvt.cc Fixups for EDG front end. 2004-04-07 03:33:36 +00:00
complex_io.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
concept-inst.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
ctype.cc Fixups for EDG front end. 2004-04-07 03:33:36 +00:00
debug.cc debug.cc: Make sure all the names are prefixed with double (or single) underscore. 2004-01-19 18:10:55 +00:00
debug_list.cc c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
ext-inst.cc Fixups for EDG front end. 2004-04-07 03:33:36 +00:00
fstream-inst.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
functexcept.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
globals_io.cc globals_io.cc: Change to __gnu_internal namespace. 2004-01-28 21:20:42 +00:00
globals_locale.cc locale_facets.h (class money_base): Add { _S_minus, _S_zero, _S_end } enum, _S_atoms. 2004-02-21 09:26:35 +00:00
io-inst.cc [multiple changes] 2003-10-09 16:53:54 +00:00
ios.cc atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add. 2004-02-27 00:49:50 +00:00
ios_failure.cc [multiple changes] 2003-10-09 16:53:54 +00:00
ios_init.cc atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add. 2004-02-27 00:49:50 +00:00
ios_locale.cc Makefile.am: Add new files. 2003-10-17 14:47:30 +00:00
istream-inst.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
limits.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
list.cc c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
locale-inst.cc locale_facets.h (money_get<>::_M_extract): Change signature: now takes a plain string&. 2004-02-27 10:12:01 +00:00
locale-misc-inst.cc locale-misc-inst.cc (__convert_from_v(long), [...]): Remove, unused. 2004-01-13 23:25:55 +00:00
locale.cc Optimize locale::_M_impl->_M_names for the most common cases... 2004-05-03 12:14:07 +00:00
locale_facets.cc locale_facets.h (class money_base): Add { _S_minus, _S_zero, _S_end } enum, _S_atoms. 2004-02-21 09:26:35 +00:00
locale_init.cc Optimize locale::_M_impl->_M_names for the most common cases... 2004-05-03 12:14:07 +00:00
localename.cc Optimize locale::_M_impl->_M_names for the most common cases... 2004-05-03 12:14:07 +00:00
misc-inst.cc re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale()) 2004-03-07 01:32:43 +00:00
ostream-inst.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
sstream-inst.cc Move from CPP to CXX. 2003-07-05 04:05:45 +00:00
stdexcept.cc * config/locale/gnu/ctype_members.cc 2002-12-27 23:03:03 +00:00
streambuf-inst.cc std_streambuf.h (__copy_streambufs): Remove the first, unused, basic_ios<> parameter. 2003-11-27 13:13:19 +00:00
string-inst.cc basic_string.h (assign(const basic_string&, size_type, size_type)): Define inline here. 2004-01-24 11:34:06 +00:00
strstream.cc re PR libstdc++/11460 (Incorrect use of int_type in strstreambuf::pbackfail) 2003-10-12 20:03:18 +00:00
tree.cc [multiple changes] 2004-01-07 20:55:06 +00:00
valarray-inst.cc strstream: Remove namespace std. 2002-07-01 19:58:42 +00:00
wlocale-inst.cc Makefile.am: Add new files. 2003-10-17 14:47:30 +00:00
wstring-inst.cc Makefile.am: Add new files. 2003-10-17 14:47:30 +00:00