stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-914) sstream ctors inefficient in reentrant modes
Date Sat, 08 Nov 2008 18:18:44 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646015#action_12646015
] 

Martin Sebor commented on STDCXX-914:
-------------------------------------

Here are the top 10 functions from the {{[stdcxx-914-gprof-gcc-4.3.0-12S.txt|https://issues.apache.org/jira/secure/attachment/12393570/stdcxx-914-gprof-gcc-4.3.0-12S.txt]}}
attachment:

{noformat}
Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total           
 time   seconds   seconds    calls  ms/call  ms/call  name    
 32.40      2.99     2.99 30000000     0.00     0.00  __rw::__rw_locale::_C_is_managed(int)
const
 13.98      4.28     1.29 50000000     0.00     0.00  __rw::__rw_locale::_C_manage(__rw::__rw_locale*,
char const*)
  6.83      4.91     0.63 10000000     0.00     0.00  std::istream& std::operator>><char,
std::char_traits<char>, std::allocator<char> >(std::istream&, std::string&)
  4.98      5.37     0.46 10000001     0.00     0.00  std::string::operator=(std::string const&)
  4.98      5.83     0.46 10000000     0.00     0.00  std::ostream& __rw::__rw_insert<char,
std::char_traits<char>, long>(std::ostream&, long)
  4.66      6.26     0.43 10000000     0.00     0.00  std::num_put<char, std::ostreambuf_iterator<char,
std::char_traits<char> > >::_C_put(std::ostreambuf_iterator<char, std::char_traits<char>
>, std::ios_base&, char, int, void const*) const
  3.36      6.57     0.31 10000000     0.00     0.00  std::string lex_cast<std::string,
long>(long const&)
  3.25      6.87     0.30 10000000     0.00     0.00  __rw::__rw_dtoa(char*, unsigned long,
unsigned int)
  3.03      7.15     0.28                             main
  2.49      7.38     0.23 30000000     0.00     0.00  std::locale::~locale()
  ...
{noformat}

> sstream ctors inefficient in reentrant modes
> --------------------------------------------
>
>                 Key: STDCXX-914
>                 URL: https://issues.apache.org/jira/browse/STDCXX-914
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 27. Input/Output
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0, 4.2.1
>            Reporter: Martin Sebor
>            Priority: Critical
>             Fix For: 4.2.2
>
>         Attachments: stdcxx-914-gprof-gcc-4.1.2-12D.txt, stdcxx-914-gprof-gcc-4.3.0-12S.txt
>
>   Original Estimate: 12h
>          Time Spent: 1h
>  Remaining Estimate: 11h
>
> As discussed in this [thread|http://markmail.org/message/hqlsw5dq23gx7d4o] stream ctors
in thread-safe builds are inefficient due to the initialization of the mutex data member in
every stream, even in those that never use it. As soon as binary compatibility rules permit
it we should remove the mutex and/or defer its initialization until it's needed. It might
be possible to implement the deferred initialization as early as 4.2.2, or maybe 4.3. Complete
removal will need to wait until 5.0.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message