SASADA Koichi <ko1 / atdot.net> wrote:
> On 2017/02/06 10:10, shyouhei / ruby-lang.org wrote:
> > VM-stored pointers
> 
> More correctly, thread-local variables (on pthread).

Was it function call overhead from pthread_getspecific?

Did you try __thread?

I think __thread was GCC-specific, but clang supports it, too;
and we can fall back to existing pthread_getspecific for other
compilers.  I think something similar was introduced for C11,
too, but we're still on C89...

But yeah, having VM struct passed with every function call
(like mrb_state in mruby) is probably most portable and fast.

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>