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 C
4+ def ruby_func
5+ 0
6+ end
7+end
8+
9+obj = C.new
10+i = 0
11+while i < 5000000
12+ obj.ruby_func
13+ obj.ruby_func
14+ obj.ruby_func
15+ obj.ruby_func
16+ obj.ruby_func
17+ obj.ruby_func
18+ obj.ruby_func
19+ obj.ruby_func
20+ obj.ruby_func
21+ i = i + 1
22+end
23+puts "done"