Have you tried investing in a replacement memory manager? It might give you a bigger overall payback than just tinkering with one aspect. Best-of-luck, - Richard -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Bill Lear Sent: 27 July 2007 20:36 To: boost-users@lists.boost.org Subject: [Boost-users] Stupid ostringstream question I have been searching the world in vain for a stringstream that works with a static buffer, and does not use the heap for memory allocation. We have an application that uses lots (12-16Gb) of memory. This puts a strain on the memory allocation routines, and when we want to create a small string we find that stringstream is very, very expensive, and sprintf into a static buffer much, much faster. Does boost provide anything like this? This actually came up when we realized that boost lexical_cast was using stringstream. When we replaced it with sprintf, our runtimes (when memory usage was very high) went down significantly. I should also point out that ANYTHING we did with dynamic memory at that point in the application (vector::push_back, for example) was hideously slow. I'd like to have the best of both worlds: the relatively clear syntax of the ostringstream inserters, working on a static buffer. Any help (code samples especially) appreciated. Bill _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users