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 19:56 +0100, Olivier Galibert wrote:
> On Sat, Nov 03, 2007 at 03:31:14AM +1100, skaller wrote:
> > On Fri, 2007-11-02 at 07:39 -0700, Ian Lance Taylor wrote:
> > > I think you need to look at the TLS access code before deciding that
> > > it has bad performance. 
> > 
> > You already said it costs a register? That's a REALLY high cost
> > to pay to support badly designed software.
> 
> Not if you have a lot of registers (anything modern but i386) or if
> the register can not really be used for anything else (%fs on i386 for
> instance).

This is not true. If you use a register for any purpose like this,
it can't be used for anything else and that has a cost.

On x86_64 which I use, every register is valuable. Don't you dare
take one away, it would have a serious performance impact AND
it would stop ME using that register for something which my application
might consider much more important, for example as a pointer to the
minor heap in a copying collector (Ocaml does this, it is the
reason it has very high performance.. I would do this in Felix too
if I could figure out how to reload the variable in a callback
invoked by foreign code). This applies to %fs on i386 too: if
the compiler uses that register, other uses are denied, and the
compiler can't tell which is more important.


-- 
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]