It's not entirely clear to me why the std::iostreams produce so much overhead. This is a set of boost templates that we use to build the stream objects. But there's clearly a significant amount of overhead. It appears to be largely in the construction of the stream, as reported by the perf tool.