General

Profile

shia (Sangyong Sim)

  • Login: shia
  • Registered on: 12/09/2018
  • Last sign in: 11/24/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 5 6

Activity

11/22/2026

09:30 AM Ruby Revision 11f224ae (git): Keep the members of Struct and Data classes in an inline field of the class (#19907)
A class can be allocated with one extra VALUE right after it, for something
that is read too often to be kept in an ivar of the class. It starts as
nil, belongs to the class and not to a box, and is marked and updated
by the GC.
A subcl...
shia (Sangyong Sim)

11/15/2026

12:58 PM Ruby Revision fc4cd887 (git): Fully initialize structs made by rb_struct_define_under before registering them
f426fa44e32e461f0610bfec0b15f95475c181c6 made Struct.new and the rest of
the C API create an anonymous struct, give it its members and only then
set it as a constant. rb_struct_define_under() was left defining the
class with rb_define_cl...
shia (Sangyong Sim)
12:32 PM Ruby Feature #22437: Speed up creation and basic operations of Struct / Data
I wrote a patch in the direction of #note-8 to #note-10, keeping the struct info on the class instead of in hidden ivars. It is two draft PRs.
## 1. https://github.com/ruby/ruby/pull/19906
A follow-up to https://github.com/ruby/rub...
shia (Sangyong Sim)

11/12/2026

02:12 PM Ruby Feature #22437: Speed up creation and basic operations of Struct / Data
This is an interim report about iseq approach experiment.
## Background
* For now, I only look at Struct. I am trying to build the `initialize` of classes made by `Struct.new(...)` (`keyword_init` nil/true/false) directly as ISEQs....
shia (Sangyong Sim)

10/29/2026

09:00 AM Ruby Revision c0813055 (git): Track the given members of Data#initialize without copying them
Data#initialize copied the member list on every call to find the missing
keywords, then cleared the given ones. A byte per member is enough to
track what was given, and the member list is only needed to build the
error message, so look i...
shia (Sangyong Sim)
01:20 AM Ruby Revision d176801d (git): Cache Struct members only on the owner Ractor
struct_ivar_get caches a member list found on a superclass into the
subclass with rb_ivar_set. The ID has no "@", so it skips the Ractor
ownership check, and a Ractor that does not own the class ends up
writing class fields concurrently ...
shia (Sangyong Sim)

10/28/2026

01:01 PM Ruby Feature #22437: Speed up creation and basic operations of Struct / Data
3rd PR is here. [Track the given members of Data#initialize without copying them](https://github.com/ruby/ruby/pull/19581)
Before digging into where to store the members, I'm going to look into the ISEQ approach first.
shia (Sangyong Sim)

10/22/2026

02:24 PM Ruby Revision 8ff4ae13 (git): Store the members directly in Data.new with positional arguments
Data.new turned positional arguments into a keyword Hash and called
initialize with it. When initialize is the default Data#initialize and
every member is given, that call can only store the members and freeze
the instance, so do that di...
shia (Sangyong Sim)
01:21 PM Ruby Feature #22437: Speed up creation and basic operations of Struct / Data
2nd pr is here. [Store the members directly in Data.new with positional arguments](https://github.com/ruby/ruby/pull/19481) shia (Sangyong Sim)
12:38 PM Ruby Feature #22437: Speed up creation and basic operations of Struct / Data
Eregon, Thanks for your comments. I would like to go that way too if possible. But as you said, generating ISEQs needs a careful look at whether the code stays maintainable, and at other side effects. So for now, I will keep working on t... shia (Sangyong Sim)

Also available in: Atom