diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-12-06 15:41:21 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-12-07 08:28:36 +0900 |
commit | 344ec26a99e09c2d2f756fa6384e75ffa48f415f (patch) | |
tree | 71aeb66c03bad047e36de3b7a5ab74962139f789 /insns.def | |
parent | 59ddb88da6bf483eeec7b85b8a85cf3719edf440 (diff) | |
download | ruby-344ec26a99e09c2d2f756fa6384e75ffa48f415f.tar.gz |
tuning trial: newobj with current ec
Passing current ec can improve performance of newobj. This patch
tries it for Array and String literals ([] and '').
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -363,7 +363,7 @@ putstring () (VALUE val) { - val = rb_str_resurrect(str); + val = rb_ec_str_resurrect(ec, str); } /* put concatenate strings */ @@ -426,7 +426,7 @@ newarray (VALUE val) // attr rb_snum_t sp_inc = 1 - (rb_snum_t)num; { - val = rb_ary_new4(num, STACK_ADDR_FROM_TOP(num)); + val = rb_ec_ary_new_from_values(ec, num, STACK_ADDR_FROM_TOP(num)); } /* put new array initialized with num values on the stack. There |