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]
Other format: [Raw text]

Re: gomp slowness


On Fri, 2007-11-02 at 20:00 +0100, Olivier Galibert wrote:
> On Sat, Nov 03, 2007 at 03:38:51AM +1100, skaller wrote:
> > My argument is basically: there is no need for any such
> > feature in a well written program. Each thread already has
> > its own local stack. Global variables should not be used
> > in the first place (except for signals etc where
> > there is no choice).
> 
> And for libraries where there is no choice.  Happens rather often.

Yes, but that is covered by 'well written program' qualification.
If you have to use a badly designed library which used global
variables, then I agree you're stuck. That is what I meant
by saying TLS is a hack to support legacy code, and should
not be required in new code. Clearly, if you mix new code
with code that calls legacy libraries, the problem is not
eliminated until you re-write those libraries, or rewrite
you app to use a better library.

I'd be rather worried if a compiler used up a register just
to support legacy libraries that my code might never call.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


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