Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #55178

Re: Any ideas on faster TLS ?

From Ron Aaron <rambamist@gmail.com>
Newsgroups comp.lang.forth
Subject Re: Any ideas on faster TLS ?
Date 2017-02-27 15:10 +0200
Organization A noiseless patient Spider
Message-ID <o918bs$ilb$1@dont-email.me> (permalink)
References <o90deq$vvp$1@dont-email.me> <yuednW2Kf9GZZC7FnZ2dnUU7-KHNnZ2d@supernews.com> <o911tb$rfl$1@dont-email.me> <o917i9$fl3$1@dont-email.me>

Show all headers | View raw



On 27/02/2017 14:56, Alex wrote:
> On 2/27/2017 11:19, Ron Aaron wrote:
>>
>>
>> On 02/27/2017 12:01, Andrew Haley wrote:
>>
>>> This is a very baffling post.  TLS on x86/Linux generates one
>>> instruction for a read of a __thread variable:
>>>
>>>     mov    %fs:offset,%eax
>>
>> Indeed, it's only one instruction.  But it's a very expensive one.  It's
>> taking up an eighth of the time of a particular function that does a lot
>> more stuff.
>>
>> So maybe there's some trick with aligning segments or something?
>>
>> This is on a 16G Linux/64-bit system (quad CPU)
>>
> 
> On my Windows Forth, I dedicate a register to USER (per thread) class
> variables. Now FS: only gets referenced for structured exeception
> handling. It is measurably slower when using MOV reg, FS: offset than
> occasionally pushing & popping the dedicated reg if it's needed for
> something else.

That's what I did in Reva, but now I'm relying on the C compiler; and
clang doesn't allow register (specific register) variables.  I suppose I
can get around this using a bit of assembler code.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Any ideas on faster TLS ? Ron Aaron <rambamist@gmail.com> - 2017-02-27 07:30 +0200
  Re: Any ideas on faster TLS ? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-02-27 04:01 -0600
    Re: Any ideas on faster TLS ? Ron Aaron <rambamist@gmail.com> - 2017-02-27 13:19 +0200
      Re: Any ideas on faster TLS ? Alex <alex@rivadpm.com> - 2017-02-27 12:56 +0000
        Re: Any ideas on faster TLS ? Ron Aaron <rambamist@gmail.com> - 2017-02-27 15:10 +0200
        Re: Any ideas on faster TLS ? albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-02-27 17:08 +0100
      Re: Any ideas on faster TLS ? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-02-27 08:06 -0600
        Re: Any ideas on faster TLS ? Ron Aaron <rambamist@gmail.com> - 2017-02-27 16:10 +0200
          Re: Any ideas on faster TLS ? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-02-27 09:31 -0600
            Re: Any ideas on faster TLS ? Ron Aaron <rambamist@gmail.com> - 2017-02-28 07:05 +0200
            Re: Any ideas on faster TLS ? Paul Rubin <no.email@nospam.invalid> - 2017-02-27 23:15 -0800
              Re: Any ideas on faster TLS ? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-02-28 04:02 -0600
                Re: Any ideas on faster TLS ? Bernd Paysan <bernd@net2o.de> - 2017-03-11 19:58 +0000
      Re: Any ideas on faster TLS ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-01 12:36 +0000
        Re: Any ideas on faster TLS ? Ron Aaron <rambamist@gmail.com> - 2017-03-01 15:11 +0200
          Re: Any ideas on faster TLS ? Alex <alex@rivadpm.com> - 2017-03-03 01:18 +0000
            Re: Any ideas on faster TLS ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-03 12:55 +0000
              Re: Any ideas on faster TLS ? Alex <alex@rivadpm.com> - 2017-03-03 14:59 +0000
                Re: Any ideas on faster TLS ? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-03 16:15 +0000
          Optimizing (was: Any ideas on faster TLS ?) Ron Aaron <rambamist@gmail.com> - 2017-03-17 13:14 +0200
  Re: Any ideas on faster TLS ? rickman <gnuarm@gmail.com> - 2017-02-28 01:13 -0500
    Re: Any ideas on faster TLS ? Paul Rubin <no.email@nospam.invalid> - 2017-02-27 22:48 -0800
      Re: Any ideas on faster TLS ? rickman <gnuarm@gmail.com> - 2017-02-28 03:50 -0500

csiph-web