Opened 9 years ago
Closed 9 years ago
#9648 closed Bugs (fixed)
string construction optimization - std::char_traits::copy could be used to avoid char by char copying
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | To Be Determined | Component: | container |
Version: | Boost 1.54.0 | Severity: | Optimization |
Keywords: | Cc: |
Description
As discussed on boost-users mailing list (see "[container.string] why isn't memcpy used in the internals?"), the performance of constructing boost::container::string from C string is a lot worse than in case of std::string. That's because boost::container::string does not use std::char_traits::copy for input C string copying but rather copies it character by character.
Environment:
- Ubuntu 12.04 (i386)
- gcc 4.6.4
- Boost 1.54.0
Attachments (2)
Change History (3)
by , 9 years ago
Attachment: | boost_container_string_assign_optimization.patch added |
---|
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in develop branch, SHA-1: ba596fc83c4c8e565a32f728e6742dacb2b9d2fc
by , 9 years ago
Attachment: | boost_container_string_assign_optimization_v2.patch added |
---|
fix proposal (v2)
Note:
See TracTickets
for help on using tickets.
fix proposal