Commit 094418a
gc.h: Reintroduce immediate guard in
This guard was removed in ruby#13497
on the justification that some GC may need to be notified even for
immediate.
But the two currently available GCs don't, and there are plenty
of assumtions GCs don't everywhere, notably in YJIT and ZJIT.
This optimization is also not so micro (but not huge either).
I routinely see 1-2% wasted there on micro-benchmarks.
So perhaps if in the future we actually need this, it might make
sense to introduce a way for GCs to declare that as an option,
but in the meantime it's extra overhead with little gain.rb_obj_written
1 parent eaa952b commit 094418a
3 files changed
+11
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6090 | 6090 | | |
6091 | 6091 | | |
6092 | 6092 | | |
6093 | | - | |
6094 | | - | |
6095 | | - | |
6096 | | - | |
6097 | | - | |
| 6093 | + | |
| 6094 | + | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
| 6098 | + | |
| 6099 | + | |
6098 | 6100 | | |
6099 | 6101 | | |
6100 | 6102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
788 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
789 | 791 | | |
790 | 792 | | |
791 | 793 | | |
| |||
0 commit comments