When a std::ostringstream object is created, it references a locale object which is synchronized by a global mutex.
This causes a significant performance problem for multi-threaded applications running on systems with many CPU's if they use string streams frequently. -- Summary: Creating a std::ostringstream object locks a global mutex Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: davewx7 at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40088