4df9c41de5
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 |
||
---|---|---|
.. | ||
allocator.h | ||
atomicity.h | ||
basic_ios.h | ||
basic_ios.tcc | ||
basic_string.h | ||
basic_string.tcc | ||
boost_concept_check.h | ||
c++config | ||
char_traits.h | ||
codecvt.h | ||
concept_check.h | ||
concurrence.h | ||
cpp_type_traits.h | ||
deque.tcc | ||
fstream.tcc | ||
functexcept.h | ||
gslice_array.h | ||
gslice.h | ||
indirect_array.h | ||
ios_base.h | ||
istream.tcc | ||
list.tcc | ||
locale_classes.h | ||
locale_facets.h | ||
locale_facets.tcc | ||
localefwd.h | ||
mask_array.h | ||
ostream.tcc | ||
postypes.h | ||
slice_array.h | ||
sstream.tcc | ||
stl_algo.h | ||
stl_algobase.h | ||
stl_bvector.h | ||
stl_construct.h | ||
stl_deque.h | ||
stl_function.h | ||
stl_heap.h | ||
stl_iterator_base_funcs.h | ||
stl_iterator_base_types.h | ||
stl_iterator.h | ||
stl_list.h | ||
stl_map.h | ||
stl_multimap.h | ||
stl_multiset.h | ||
stl_numeric.h | ||
stl_pair.h | ||
stl_queue.h | ||
stl_raw_storage_iter.h | ||
stl_relops.h | ||
stl_set.h | ||
stl_stack.h | ||
stl_tempbuf.h | ||
stl_threads.h | ||
stl_tree.h | ||
stl_uninitialized.h | ||
stl_vector.h | ||
stream_iterator.h | ||
streambuf_iterator.h | ||
streambuf.tcc | ||
stringfwd.h | ||
type_traits.h | ||
valarray_after.h | ||
valarray_array.h | ||
valarray_array.tcc | ||
valarray_before.h | ||
vector.tcc |