General

Profile

byroot (Jean Boussier)

Issues

open closed Total
Assigned issues 1 34 35
Reported issues 25 157 182

Projects

Project Roles Registered on
Ruby Committer 09/27/2021

Activity

Today

03:59 PM Ruby Revision acc624e4 (git): [ruby/json] Prevent ResumableParser double initialization
Reported-By: Frank Kuhn <frank@swipergy.com>
https://github.com/ruby/json/commit/c737292654
byroot (Jean Boussier)
03:40 PM Ruby Revision 14285dee (git): Optimize `String.new(capacity:)`
Followup: https://github.com/ruby/ruby/pull/19537
Similarly, by adding a fastpath for `String` in
`opt_new` we can peek in the stack to pre-allocate
a string of the right size.
Additionally, by moving `String#initialize` in
`string.rb`...
byroot (Jean Boussier)
03:09 PM Ruby Revision af71c7ae (git): ZJIT: extend `gen_new_hash` optimization to String keys (take 2)
String keys are about as common as symbol ones, and can benefit
from the same optimization because Ruby hashes directly hash and
compare bare strings without calling `#hash` nor `#eql?` just like
Symbols.
However that only applies if ke...
byroot (Jean Boussier)
11:06 AM Ruby Feature #22501 (Closed): Optimize `Hash.new` and `String.new` in `opt_new`
A bug report has been filed [Bug #22539] and backport requested for 4.0.
Closing this, and I'll merge the `String.new` fastpath soon.
byroot (Jean Boussier)
10:55 AM Ruby Feature #22501: Optimize `Hash.new` and `String.new` in `opt_new`
> BTW, I think this should be Bug, not Feature since it's an unintentional incompatibility.
The bug should be a different ticket. I'll open it.
byroot (Jean Boussier)
08:09 AM Ruby Feature #22501: Optimize `Hash.new` and `String.new` in `opt_new`
> refinements applying to initialize seems an accidental side-effect of opt_new inlining the call to initialize in the bytecode and we should fix it.
Indeed.
> ...
I assume it means instead of generating a `send` instruction, we ne...
byroot (Jean Boussier)
11:04 AM Ruby Bug #22539 (Closed): Class#new shouldn't call refined initialize methods
Since the introduction of `opt_new` in [Feature #21254], if a class's `initialize` method is refined, the refined version is called.
That's not the case when disabling compiler optimizations, or calling `new` with `send`.
After put...
byroot (Jean Boussier)

11/11/2026

01:31 PM Ruby Bug #22533: Peephole optimizer infinite loop
I have a patch for this: https://github.com/ruby/ruby/pull/19844, but I'm not 100% certain it doesn't regress this optimization, and based on the handful of failing ZJIT tests, it looks like it does generate different code sometimes.
...
byroot (Jean Boussier)
08:14 AM Ruby Revision 2a250326 (git): Revert "hash.c: rb_any_cmp only consider the LHS for optimization"
This reverts commit f2828fd01fb52b89562cdfe8791c097e050aa6e9. byroot (Jean Boussier)
08:00 AM Ruby Revision f2828fd0 (git): hash.c: rb_any_cmp only consider the LHS for optimization
If the left hand side is a Symbol or bare String, it doesn't make
sense to gate the optimization to the right hand side being of the
same type.
If the type differs, we can directly return.
byroot (Jean Boussier)

Also available in: Atom