Ovanes, ok, got it! Thanks for the nice examples and your patience. I learned a lot today :-) In the meantime I created my own FormattedBackInserter (see attached code, just a very crude prototype as of now), which allows me to do the job even faster via std::copy. Regards, Roland Ovanes Markarian wrote:
On Sun, Mar 1, 2009 at 3:36 PM, Roland Bock
mailto:rbock@eudoxos.de> wrote: Ovanes,
I wonder, though, is there a standard way to write integers to a stream_buf? As far as I can see, the ostreambuf_iterator takes character classes as template arguments, only.
Regards,
Roland
Roland,
please take a look at this code: http://codepad.org/UGubU7cw
It it always customized numeric converter is almost always faster as writing integers to stringstream with operator<<. Anyway these two tests perform most equally on linux/g++ (but tested very roughly). For Example on MSVC-compiler std::copy was faster as the for-loop. I assume compiler can better optimze in this case.
Good Luck, Ovanes
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users