stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Travis Vitek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-249) std::operator>>(istream, string&) inefficient
Date Thu, 07 Feb 2008 19:39:08 GMT

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

Travis Vitek commented on STDCXX-249:
-------------------------------------

Thanks for the feedback. I wish you had responded via e-mail as it is easier to reply to.
Regardless...

# removed the comment about resetting width and exception safety
# changed for loop to a while
# removed the comment that __pdel < __egptr and __pdel == __egptr. those was notes and
are unnecessary.
# comment trimmed
# moved variable name to line below for consistency with std::getline implementation
# this was the only place in this source file that we used __is.badbit. everywhere else we
used ios_base::badbit, so now things are consistent

Patch updated and committed to trunk in [r619587|http://svn.apache.org/viewvc?view=rev&revision=619587]
Needs to be merged to 4.2.x after some exposure time.

> std::operator>>(istream, string&) inefficient
> ---------------------------------------------
>
>                 Key: STDCXX-249
>                 URL: https://issues.apache.org/jira/browse/STDCXX-249
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 21. Strings
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Travis Vitek
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-249.patch
>
>   Original Estimate: 8h
>          Time Spent: 9h
>  Remaining Estimate: 0h
>
> The string extractor reads and appends one character at a time. It could be made more
efficient by extracting and appending all non-whitespace characters that are available in
the buffer in chunks. See the definition of the operator here:
> http://svn.apache.org/viewvc/stdcxx/trunk/include/istream.cc?revision=383265

-- 
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