[#79532] Immutable Strings vs Symbols — Daniel Ferreira <subtileos@...>

Hi,

15 messages 2017/02/15

[ruby-core:79474] Re: [Ruby trunk Bug#13188] Reinitialize Ruby VM.

From: Eric Wong <normalperson@...>
Date: 2017-02-07 22:18:06 UTC
List: ruby-core #79474
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>

In This Thread