diff options
author | Jean Boussier <[email protected]> | 2025-04-10 11:53:39 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-04-15 07:57:39 +0900 |
commit | 0606046c1a3816eabb26b5de18942c02710eb28e (patch) | |
tree | c2f3b911f1071c1d7e3af27445f9f1c5fbad34b1 /misc/lldb_cruby.py | |
parent | b68172caada45724a302f337334f29ebae5a0e1e (diff) |
Lazily create `objspace->id_to_obj_tbl`
This inverse table is only useful if `ObjectSpace._id2ref` is used,
which is extremely rare. The only notable exception is the `drb` gem
and even then it has an option not to rely on `_id2ref`.
So if we assume this table will never be looked up, we can just
not maintain it, and if it turns out `_id2ref` is called, we
can lock the VM and re-build it.
```
compare-ruby: ruby 3.5.0dev (2025-04-10T09:44:40Z master 684cfa42d7) +YJIT +PRISM [arm64-darwin24]
built-ruby: ruby 3.5.0dev (2025-04-10T10:13:43Z lazy-id-to-obj d3aa9626cc) +YJIT +PRISM [arm64-darwin24]
warming up..
| |compare-ruby|built-ruby|
|:----------|-----------:|---------:|
|baseline | 26.364M| 25.974M|
| | 1.01x| -|
|object_id | 10.293M| 14.202M|
| | -| 1.38x|
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13115
Diffstat (limited to 'misc/lldb_cruby.py')
0 files changed, 0 insertions, 0 deletions