diff options
-rw-r--r-- | benchmark/mjit_struct_aref.yml | 10 | ||||
-rw-r--r-- | struct.c | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/benchmark/mjit_struct_aref.yml b/benchmark/mjit_struct_aref.yml new file mode 100644 index 0000000000..bfba1323f2 --- /dev/null +++ b/benchmark/mjit_struct_aref.yml @@ -0,0 +1,10 @@ +type: lib/benchmark_driver/runner/mjit +prelude: | + def mjit_struct_aref(struct) + struct.aa + end + struct = Struct.new(:a0, :a1, :a2, :a3, :a4, :a5, :a6, :a7, :a8, :a9, :aa).new + +benchmark: mjit_struct_aref(struct) + +loop_count: 40000000 @@ -324,6 +324,7 @@ static void define_aref_method(VALUE nstr, VALUE name, VALUE off) { const rb_iseq_t *iseq = rb_method_for_self_aref(name, off, &struct_aref_builtin); + iseq->body->builtin_inline_p = true; rb_add_method_iseq(nstr, SYM2ID(name), iseq, NULL, METHOD_VISI_PUBLIC); } |