<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/include/ruby/internal/core, branch v4.0.2</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>thread_sync.c: declare queue_data_type as parent of szqueue_data_type.</title>
<updated>2025-12-18T19:57:05+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-18T08:35:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=8cf4f373ff596aaef7aaec993c355b242d4fe2c1'/>
<id>8cf4f373ff596aaef7aaec993c355b242d4fe2c1</id>
<content type='text'>
Allows to remove some duplicated code like szqueue_length, etc.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows to remove some duplicated code like szqueue_length, etc.
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't declare `rbimpl_check_typeddata` as pure</title>
<updated>2025-12-09T17:08:00+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-09T16:39:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=98390d9360b8b8c82f798f51567587882c4e5c00'/>
<id>98390d9360b8b8c82f798f51567587882c4e5c00</id>
<content type='text'>
[Bug #21771]

It may raise so it's incorrect and can lead to the compiler
optimizing the call out.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[Bug #21771]

It may raise so it's incorrect and can lead to the compiler
optimizing the call out.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix typo s/sharable/shareable/</title>
<updated>2025-12-04T18:10:50+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2025-12-04T17:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=2aaea665bb19be8ed64605ec9aa5c990fddbd2ce'/>
<id>2aaea665bb19be8ed64605ec9aa5c990fddbd2ce</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>(experimental) RUBY_TYPED_FROZEN_SHAREABLE_NO_REC</title>
<updated>2025-12-04T17:28:30+00:00</updated>
<author>
<name>Koichi Sasada</name>
<email>ko1@atdot.net</email>
</author>
<published>2025-12-04T16:13:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f2cd772329b8d07e29ed114480ff99ad36acbd75'/>
<id>f2cd772329b8d07e29ed114480ff99ad36acbd75</id>
<content type='text'>
`T_DATA` has a flag `RUBY_TYPED_FROZEN_SHAREABLE` which means
if the `T_DATA` object is frozen, it can be sharable.
On the `Ractor.make_sharable(obj)`, rechable objects from the
`T_DATA` object will be apply `Ractor.make_shareable` recursively.

`RUBY_TYPED_FROZEN_SHAREABLE_NO_REC` is similar to the
`RUBY_TYPED_FROZEN_SHAREABLE`, but doesn't apply `Ractor.make_sharable`
recursively for children.
If it refers to unshareable objects, it will simply raise an error.

I'm not sure this pattern is common or not, so it is not in public.
If we find more cases, we can discuss publication.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`T_DATA` has a flag `RUBY_TYPED_FROZEN_SHAREABLE` which means
if the `T_DATA` object is frozen, it can be sharable.
On the `Ractor.make_sharable(obj)`, rechable objects from the
`T_DATA` object will be apply `Ractor.make_shareable` recursively.

`RUBY_TYPED_FROZEN_SHAREABLE_NO_REC` is similar to the
`RUBY_TYPED_FROZEN_SHAREABLE`, but doesn't apply `Ractor.make_sharable`
recursively for children.
If it refers to unshareable objects, it will simply raise an error.

I'm not sure this pattern is common or not, so it is not in public.
If we find more cases, we can discuss publication.
</pre>
</div>
</content>
</entry>
<entry>
<title>Speedup TypedData_Get_Struct</title>
<updated>2025-12-03T16:54:27+00:00</updated>
<author>
<name>Jean Boussier</name>
<email>jean.boussier@gmail.com</email>
</author>
<published>2025-12-03T13:50:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=fcf3939780972d587b18afc26c4abd2da2c0b7ec'/>
<id>fcf3939780972d587b18afc26c4abd2da2c0b7ec</id>
<content type='text'>
While profiling `Monitor#synchronize` and `Mutex#synchronize`
I noticed a fairly significant amount of time spent in
`rb_check_typeddata`.

By implementing a fast path that assumes the object is valid
and that can be inlined, it does make a significant difference:

Before:

```
  Mutex     13.548M (± 3.6%) i/s   (73.81 ns/i) -     68.566M in   5.067444
Monitor     10.497M (± 6.5%) i/s   (95.27 ns/i) -     52.529M in   5.032698s
```

After:

```
  Mutex     20.887M (± 0.3%) i/s   (47.88 ns/i) -    106.021M in   5.075989s
Monitor     16.245M (±13.3%) i/s   (61.56 ns/i) -     80.705M in   5.099680s
```

```ruby
require 'bundler/inline'

gemfile do
  gem "benchmark-ips"
end

mutex = Mutex.new
require "monitor"
monitor = Monitor.new

Benchmark.ips do |x|
  x.report("Mutex") { mutex.synchronize { } }
  x.report("Monitor") { monitor.synchronize { } }
end
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While profiling `Monitor#synchronize` and `Mutex#synchronize`
I noticed a fairly significant amount of time spent in
`rb_check_typeddata`.

By implementing a fast path that assumes the object is valid
and that can be inlined, it does make a significant difference:

Before:

```
  Mutex     13.548M (± 3.6%) i/s   (73.81 ns/i) -     68.566M in   5.067444
Monitor     10.497M (± 6.5%) i/s   (95.27 ns/i) -     52.529M in   5.032698s
```

After:

```
  Mutex     20.887M (± 0.3%) i/s   (47.88 ns/i) -    106.021M in   5.075989s
Monitor     16.245M (±13.3%) i/s   (61.56 ns/i) -     80.705M in   5.099680s
```

```ruby
require 'bundler/inline'

gemfile do
  gem "benchmark-ips"
end

mutex = Mutex.new
require "monitor"
monitor = Monitor.new

Benchmark.ips do |x|
  x.report("Mutex") { mutex.synchronize { } }
  x.report("Monitor") { monitor.synchronize { } }
end
```
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify RSRING_GETMEM() definition.</title>
<updated>2025-11-11T09:57:30+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-11-09T23:37:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=48dce7874fcb571765635b32fa6a3e3a12e228f8'/>
<id>48dce7874fcb571765635b32fa6a3e3a12e228f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>include/ruby/internal/core/rstring.h: Remove rbimpl_rstring_getmem() definition.</title>
<updated>2025-11-11T09:57:30+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-11-09T23:35:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=367ddd445cdf5ccc55a0481c944746ef595f72f7'/>
<id>367ddd445cdf5ccc55a0481c944746ef595f72f7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove rbimpl_rstring_getmem() usage as workaround for GCC 15.2.1 optimization bug. [Bug #21655]</title>
<updated>2025-11-11T09:57:30+00:00</updated>
<author>
<name>nagachika</name>
<email>nagachika@ruby-lang.org</email>
</author>
<published>2025-11-09T06:10:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=9d44cb0b2b5520b2b299851003ca2a97bf1e2079'/>
<id>9d44cb0b2b5520b2b299851003ca2a97bf1e2079</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use pointer to the member</title>
<updated>2025-10-25T13:48:01+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-10-25T02:57:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=0a924d46156a9c86ba657f2cb4e2fcee9aee81bf'/>
<id>0a924d46156a9c86ba657f2cb4e2fcee9aee81bf</id>
<content type='text'>
Instead of the offset calculation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of the offset calculation.
</pre>
</div>
</content>
</entry>
<entry>
<title>[DOC] Follow up GH-14470</title>
<updated>2025-10-25T09:10:15+00:00</updated>
<author>
<name>Nobuyoshi Nakada</name>
<email>nobu@ruby-lang.org</email>
</author>
<published>2025-10-25T05:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=31e14ac7dadc99851fefbb5d5d4232ba9f568f1b'/>
<id>31e14ac7dadc99851fefbb5d5d4232ba9f568f1b</id>
<content type='text'>
`IS_TYPED_DATA` is no longer a flag in `type`, and the "embedded" flag
has been shifted accordingly.

ruby/ruby#14470
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`IS_TYPED_DATA` is no longer a flag in `type`, and the "embedded" flag
has been shifted accordingly.

ruby/ruby#14470
</pre>
</div>
</content>
</entry>
</feed>
