string and __thread

Nathan Myers ncm-nospam@cantrip.org
Mon Mar 31 19:52:00 GMT 2003


On Mon, Mar 31, 2003 at 11:06:28AM -0600, Benjamin Kosnik wrote:
> 
> >Does any non-ELF system even have the ability to support this feature?
> 
> No.
> 
> Furthermore, most of this problem statement/theoretical solution is
> speculation, although well meaning. I'm uneasy about such changes
> without any actual profiling or evidence that there is a problem, and
> that this solves it.

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.  (Let's not nip off discussion of 
performance improvements before results are demonstrated; that's
a good way to keep from getting any.)  

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.

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.

Nathan Myers
ncm-nospam@cantrip.org



More information about the Libstdc++ mailing list