
On Tue, Jun 10, 2008 at 1:31 AM, Frank Birbacher <bloodymir.crap@gmx.net> wrote:
Hi!
Matus Chochlik schrieb:
Other difference is my use of std::string as a return type. Seems you have a complex system to compute string length and use char*. Not sure which one is the best but I'm willing to hear the rationale behind this choice.
Well there is no bulletproof ;) rationale behind this. I've made some performance tests with both char* buffer and with ::std::string and char* buffer did better. When formatting the type name of a complicated template there is a lot of string copying and realocation.
Which is why there is a stringstream. You won't return anything but instead write into a ostream& directly. This reduces the complexity of the algorithm.
Well, unless you want to do something else with the type name besides writing it into an ostream ;)
Frank
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- ________________ ::matus_chochlik