So, it may be sounds as a realy newbies question... And proboly it is newbies :)
I try to turn infomation from boost::asio::streambuf which I got, using read_until
into char*. I've found realy many examples of turning it into std::string, but I'd mad, if use bufer -> std::string -> 开发者_Go百科c_str
in an application, needs a high perfomanse. (But in fact, I ectally do not realy stuff like conteiners and so on.)
You are assuming that converting a std::string into a C string hurts performance.
This should not be assumed. std::string is often implemented as a wrapper around a C string.
If you are unhappy with current performance, start by using a run-time profiler on your code.
精彩评论