From: Eric Wong Date: 2017-02-07T22:18:06+00:00 Subject: [ruby-core:79474] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM. SASADA Koichi 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: