On Dec 18, 2004, at 6:19 PM, Curt Arnold wrote:
Just to fight at least a little for STL (I don't want to start a flame-war
about STL): I created StringHelper::UlongToString-methods and benchmarked it
against std::wostringstream. The result was, that for large numbers
(>INT_MAX, where your optimization don't catch), it took 2.3 seconds to
format 1000000 with UlongToString and 1.5 seconds with std::wostringstream
(including std::wostringstream-creation). For small numbers UlongToString
took 0.5 seconds.
For thread id it is probably more useful to output hex, since any debugger would be unlikely to display a signed decimal representation (plus it is very simple to implement).
