This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: basic_string::release and thread safety: what about


>>>>> "Dima" == Dima Volodin <dvv@dvv.ru> writes:

    >> I'm not willing to pay 10x or more speed penalties on
    >> uniprocessor, non-threaded code myself.

Note that you're assuming that there should be some way to share
strings across threads.  I don't think that's *automatically* a
given, although, obviously I see the benefits. 

If the only way to share a string across threads is to put it in
global storage, and acquire a mutex before accessing it, then there's
no need for any single-threaded penalty.  It's a
quality-of-implementation question; would such a "bare-bones" solution
be acceptable?

I don't really have an opinion; just throwing out an idea at what
extreme end of the spectrum.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]