gcc/libstdc++-v3/include/bits
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
..
allocator.h allocator: New. 2004-03-13 06:54:25 +00:00
atomicity.h atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add. 2004-02-27 00:49:50 +00:00
basic_ios.h
basic_ios.tcc
basic_string.h PR libstdc++/15002 (partial) 2004-04-19 11:30:20 +00:00
basic_string.tcc PR libstdc++/15002 (continued again) 2004-04-25 15:45:13 +00:00
boost_concept_check.h Fixups for EDG front end. 2004-04-07 03:33:36 +00:00
c++config Daily bump. 2004-05-03 00:16:11 +00:00
char_traits.h
codecvt.h Fixups for EDG front end. 2004-04-07 03:33:36 +00:00
concept_check.h
concurrence.h re PR libstdc++/12658 (Thread safety problems in locale::global() and locale::locale()) 2004-03-07 01:32:43 +00:00
cpp_type_traits.h [multiple changes] 2004-03-26 00:38:57 +00:00
deque.tcc deque.tcc: Trivial formatting fixes. 2004-04-21 14:06:00 +00:00
fstream.tcc re PR libstdc++/14975 ([3.4 only] Segfault on low-level write error during imbue) 2004-04-16 16:06:21 +00:00
functexcept.h
gslice_array.h howto.html: Add entry for DR 253 [Ready]. 2004-03-12 23:32:03 +00:00
gslice.h re PR libstdc++/3247 (valarray private member) 2004-03-10 06:50:13 +00:00
indirect_array.h howto.html: Add entry for DR 253 [Ready]. 2004-03-12 23:32:03 +00:00
ios_base.h atomicity.h: New, forward declarations for __atomic_add and __exchange_and_add. 2004-02-27 00:49:50 +00:00
istream.tcc istream.tcc: Fix comment. 2004-04-26 15:26:18 +00:00
list.tcc c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
locale_classes.h Optimize locale::_M_impl->_M_names for the most common cases... 2004-05-03 12:14:07 +00:00
locale_facets.h locale_facets.h: Tweaks for 80 column. 2004-03-24 06:41:07 +00:00
locale_facets.tcc locale_facets.h: Tweaks for 80 column. 2004-03-24 06:41:07 +00:00
localefwd.h
mask_array.h howto.html: Add entry for DR 253 [Ready]. 2004-03-12 23:32:03 +00:00
ostream.tcc
postypes.h re PR libstdc++/14320 (istreambuf_iterator::difference_type is not a signed integral type) 2004-03-03 00:22:05 +00:00
slice_array.h howto.html: Add entry for DR 253 [Ready]. 2004-03-12 23:32:03 +00:00
sstream.tcc
stl_algo.h
stl_algobase.h
stl_bvector.h stl_bvector.h: Use _M_impl._M_start. 2004-04-18 05:04:58 +00:00
stl_construct.h
stl_deque.h deque.tcc: Trivial formatting fixes. 2004-04-21 14:06:00 +00:00
stl_function.h
stl_heap.h
stl_iterator_base_funcs.h
stl_iterator_base_types.h
stl_iterator.h
stl_list.h deque.tcc: Trivial formatting fixes. 2004-04-21 14:06:00 +00:00
stl_map.h c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
stl_multimap.h c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
stl_multiset.h c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
stl_numeric.h
stl_pair.h
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h c++config (_GLIBCXX_STD): New. 2004-04-16 19:04:07 +00:00
stl_stack.h
stl_tempbuf.h
stl_threads.h
stl_tree.h deque.tcc: Trivial formatting fixes. 2004-04-21 14:06:00 +00:00
stl_uninitialized.h
stl_vector.h stl_vector.h: Trivial formatting fixes. 2004-04-26 09:02:43 +00:00
stream_iterator.h
streambuf_iterator.h
streambuf.tcc
stringfwd.h
type_traits.h
valarray_after.h
valarray_array.h
valarray_array.tcc 2004-03-10 Paolo Carlini <pcarlini@suse.de> 2004-03-10 17:08:32 +00:00
valarray_before.h
vector.tcc stl_vector.h: Trivial formatting fixes. 2004-04-26 09:02:43 +00:00