id summary reporter owner description type status milestone component version severity resolution keywords cc 4617 Use of stringstreams in numeric/ublas/io Kostya Gunter "Not 100% sure it is a bug, but use of additional string streams seems a bit odd. {{{ template // BOOST_UBLAS_INLINE This function seems to be big. So we do not let the compiler inline it. std::basic_ostream &operator << (std::basic_ostream &os, const matrix_expression &m) { typedef typename ME::size_type size_type; size_type size1 = m ().size1 (); size_type size2 = m ().size2 (); std::basic_ostringstream > s; s.flags (os.flags ()); s.imbue (os.getloc ()); s.precision (os.precision ()); s << '[' << size1 << ',' << size2 << ""](""; if (size1 > 0) { s << '(' ; if (size2 > 0) s << m () (0, 0); for (size_type j = 1; j < size2; ++ j) s << ',' << m () (0, j); s << ')'; } for (size_type i = 1; i < size1; ++ i) { s << "",("" ; if (size2 > 0) s << m () (i, 0); for (size_type j = 1; j < size2; ++ j) s << ',' << m () (i, j); s << ')'; } s << ')'; return os << s.str ().c_str (); } }}} why do we create stringstream 's' and serialize everything in memory and only then pump it to 'os'?" Bugs new To Be Determined uBLAS Boost 1.44.0 Optimization