|
Boost Users : |
From: Rodrigo Baroni (rodrigobaroni_at_[hidden])
Date: 2005-12-13 13:56:23
Thanks once time again Jonathan!
I'm busy with some university works by now, but very soon (I hope in
this week) I'll try that, and I'll report you back the measures.
By the way, It's a honor a answer from the developer of many classes
of boost :)
Cheers,
Rodrigo F Baroni
On 12/12/05, Jonathan Turkanis <technews_at_[hidden]> wrote:
> Rodrigo Baroni wrote:
> > I just have one doubt now: The output to a std::string (that has
> > internal variable size, and so, maybe use some linked queue, or
> > whatever I guess), or to output to a pre-alocated buffer?
> >
> > Shouldn't be, in some cases where this task is done a lot of
> > times in a loop (like is the case - where I'm doing compression of
> > frames in a streaming video server) be more faster and better to
> > output to memory directly in a pre-alocated buffer?
>
> Possibly; you'd have to measure it. If you use a vector and call reserve(), I
> doubt you'll notice any difference.
>
> It's also easy to write an array_sink that counts the number of characters that
> have been written to it. There's an example implementation at
> <boost/iostreams/detail/counted_array.hpp>.
>
> --
> Jonathan Turkanis
> www.kangaroologic.com
>
>
>
> _______________________________________________
> 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