Boost logo

Boost :

From: Trey Jackson (tjackson_at_[hidden])
Date: 2003-10-23 15:03:57

Anders Hybertz wrote:
>I'm sitting and reading an article in the latest Dr. Dobb's Journal -
>October 2003 issue.
>There is quite an interesting article on "C++ String Performance" -
>the guy has made some kind of string implementation that performs
>between 2 and 25.000 times better than the std:string or
>std::basic_string<T>. Especially the performance gains in
>multithreaded application is outstanding.

I'm still having trouble with the fact that Dr. Dobbs published such a
hack. Even I was able to figure out a bunch of the shortcomings of
the implementation (wasted memory, incompatible string types, ...)

He incorrectly "determines" the cause of the slowdown.
FWIW, simply setting the environment variable


which disables memory caching gets the std::string example to within
10% of his CGenString example (teststring4).


(tested using gcc 3.2.3)


Trey Jackson
"Why, the fax machine is nothing but
 a waffle iron with a phone attached!"
-- Grandpa Simpson

Boost list run by bdawes at, gregod at, cpdaniel at, john at