Commit d1ce6031
d1ce6031ff7eMerged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 4 files · +3 added · ~1 modified
Description
Fix VALUE==VALUE binary ops, add setivar/object-new-no-escape benchmarks, clear var table between resolve passes
- VALUE==VALUE now produces C == (was unsupported)
- Clear stale var entries after resolve_class_types to prevent method param names from polluting top-level variable inference
- setivar_object: Spinel <0.01s vs CRuby 0.12s
- setivar_young: Spinel <0.01s vs CRuby (similar)
- object-new-no-escape: Spinel 0.03s vs CRuby 0.46s (15x)
Skipped: matmul (needs Float array), gcbench/splay (nil-typed ivars)
73/73 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- d1ce6031ff7e
- Parent
- f43a7ea7746c
examples/bm_object_new_no_escape.rbaddedView file
1+
# object-new-no-escape benchmark (from yjit-bench)2+
3+
class Point4+
attr_reader :x, :y5+
def initialize(x, y)6+
@x = x7+
@y = y8+
end9+
end10+
11+
def test12+
a = Point.new(1, 2)13+
b = Point.new(1, 2)14+
if a.x == b.x && a.y == b.y15+
116+
else17+
018+
end19+
end20+
21+
total = 022+
i = 023+
while i < 100000024+
total = total + test25+
i = i + 126+
end27+
puts total28+
puts "done"examples/bm_setivar_object.rbaddedView file
Loading diff…
examples/bm_setivar_young.rbaddedView file
Loading diff…
src/codegen.cmodifiedView file
Loading diff…