Skip to content

[pull] master from ruby:master - #1438

Merged
pull[bot] merged 8 commits into
turkdevops:masterfrom
ruby:master
Sep 23, 2026
Merged

pull[bot] merged 8 commits into
turkdevops:masterfrom
ruby:master

Conversation

@pull

@pull pull Bot commented Sep 23, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Earlopain and others added 8 commits September 23, 2026 07:42
storage behind `PM_STRING_EMPTY`
(ruby/prism#4228)

Some places memcpy the source, and NULL there is undefined behaviour.

Fixes https://bugs.ruby-lang.org/issues/22254

ruby/prism@d0b36ceb34
Keyword tracking only needs membership, so replace identity hashes
with identity sets to avoid storing unused values.  Add `rb_set_p`
for the type assertion in `vm_check_keyword`.

Add benchmarks for 31, 32 and 128 keyword parameters with sparse and
dense dynamic defaults, using both direct keywords and keyword splats.
The 31-parameter cases provide a bitmask-only control.

Local arm64 macOS measurements show about 16-26% higher throughput
with many omitted dynamic defaults at 32 and 128 parameters.  Smaller
differences remain noisy, including in the bitmask-only controls.

The tracking container is created at call time, leaving IBF and
`ISeq#to_a` unchanged.  Verify IBF-loaded calls with the Integer
refinement and colliding keyword indices from [Bug #22335].
Closes Shopify#1051

The LIR generated without stats is the same, but now the `LoadField` can be deduped.

Same as #18251 but without moving the `xor` to the HIR.

Generate HIR is now:

```
          v31:CUInt64 = LoadField v29, :RBASIC_FLAGS@0x1040
          v32:CUInt64 = LoadField v30, :RBASIC_FLAGS@0x1040
          v33:StringExact = StringAppend v29, v30, recv_flags: v31, other_flags: v32
```

Compared with:

```
          v31:StringExact = StringAppend v29, v30
```

### Benchmark

```
before: ruby 4.1.0dev (2026-09-17T02:33:06Z :detached: e6ec155) +PRISM [arm64-darwin25]
after: ruby 4.1.0dev (2026-09-17T03:27:34Z :detached: fc9a90e) +PRISM [arm64-darwin25]

----------  -------------  -------------  -------------  ------------
bench         before (ms)     after (ms)  after 1st itr  before/after
lobsters     636.7 ± 5.0%   631.6 ± 2.6%          0.999         1.008
railsbench  1175.6 ± 1.3%  1171.6 ± 1.3%          0.978         1.003
str_concat    41.7 ± 2.4%    42.3 ± 3.4%          1.006         0.984
----------  -------------  -------------  -------------  ------------

Legend:
- after 1st itr: ratio of before/after time for the first benchmarking iteration.
- before/after: ratio of before/after time. Higher is better for after. Above 1 represents a speedup.
```
@pull pull Bot locked and limited conversation to collaborators Sep 23, 2026
@pull pull Bot added the ⤵️ pull label Sep 23, 2026
@pull
pull Bot merged commit d8177d6 into turkdevops:master Sep 23, 2026
1 of 3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants