This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: string and __thread
>Obviously we want experience, which is why I posted. The problem
>is well-known, and has been belabored at length in the literature,
>e.g. Herb Sutter's benchmarks.
Perhaps you could consider adding this in the 21_strings
documentation as part of your patch below? I'd appreciate it.
>As it happens, the alternative suggestion I had mentioned doesn't
>need special linker/loader support, and already has industrial
>demonstration: it's used in the Rogue Wave library. Furthermore,
>it can sometimes improve performance even in single-CPU contexts.
>Best of all, it's obviously non-disruptive.
Sounds like a much better approach.
>That alternative is to test the pointer for equality to the known
>empty-string object before doing an increment or decrement-and-test.
>I will prepare a patch if Paolo doesn't get to it first.
Looking forward to your patch.
I suspect when it's posted, and people actually have something in hand,
you'll see more wilingness to experiment with it and give feedback on MT
apps under heavy load.
best,
benjamin