diff options
author | Jemma Issroff <jemmaissroff@gmail.com> | 2022-11-22 15:28:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-22 15:28:14 -0500 |
commit | 9c5e3671ebd9c07c178ca5dac08ad15ad1eae411 (patch) | |
tree | 06f4f0560176011f14832d82f9e141ead7cac3f2 /vm_core.h | |
parent | 20b9d7b9fde83c98046eacdfcb40e8cb6607963e (diff) |
Increment max_iv_count on class based on number of set_iv in initialize (#6788)
We can loosely predict the number of ivar sets on a class based on the
number of iv set instructions in the initialize method. This should give
us a more accurate estimate to use for initial size pool allocation,
which should in turn give us more cache hits.
Notes
Notes:
Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1158,6 +1158,7 @@ rb_iseq_t *rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_call VALUE rb_iseq_disasm(const rb_iseq_t *iseq); int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child); +attr_index_t rb_estimate_iv_count(VALUE klass, const rb_iseq_t * initialize_iseq); VALUE rb_iseq_coverage(const rb_iseq_t *iseq); |