Commit d559e807
d559e8076432Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 1 file · +1 added
Description
Add cfunc_itself, send_rubyfunc_block benchmarks
- Integer#itself added (identity method)
- cfunc_itself: Spinel <0.01s vs CRuby 0.21s
- send_rubyfunc_block: Spinel <0.01s vs CRuby 0.82s
Skipped: gcbench, getivar-module, splay, object-new-initialize, object-new-no-escape (all need deeper type inference for nil-typed ivars or module method dispatch).
68/68 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- d559e8076432
- Parent
- f3fc90475547
examples/bm_send_rubyfunc_block.rbaddedView file
1+
# send_rubyfunc_block benchmark (from yjit-bench)2+
3+
class C4+
def ruby_func5+
06+
end7+
end8+
9+
obj = C.new10+
i = 011+
while i < 500000012+
obj.ruby_func13+
obj.ruby_func14+
obj.ruby_func15+
obj.ruby_func16+
obj.ruby_func17+
obj.ruby_func18+
obj.ruby_func19+
obj.ruby_func20+
obj.ruby_func21+
i = i + 122+
end23+
puts "done"