Commit f3fc9047
f3fc90475547Merged
Yukihiro "Matz" Matsumoto <[email protected]> · 8 months ago · 2 files · +1 added · ~1 modified
Description
Add Integer#itself, port cfunc_itself benchmark
itself returns self (identity). Spinel <0.01s vs CRuby 0.21s. 68/68 tests pass.
Co-Authored-By: Claude Opus 4.6 (1M context) [email protected]
Details
- Commit
- f3fc90475547
- Parent
- 2912f5b95547
examples/bm_cfunc_itself.rbaddedView file
1+
# cfunc_itself benchmark (from yjit-bench)2+
# Integer#itself returns self3+
4+
total = 05+
n = 06+
while n < 5000007+
i = 08+
while i < 109+
total = total + i.itself10+
i = i + 111+
end12+
n = n + 113+
end14+
puts total15+
puts "done"src/expr.cmodifiedView file
Loading diff…