|
Boost Users : |
From: Richard (richard_at_[hidden])
Date: 2007-07-27 15:47:54
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_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Bill Lear
Sent: 27 July 2007 20:36
To: boost-users_at_[hidden]
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_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net