summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorJemma Issroff <jemmaissroff@gmail.com>2022-11-22 15:28:14 -0500
committerGitHub <noreply@github.com>2022-11-22 15:28:14 -0500
commit9c5e3671ebd9c07c178ca5dac08ad15ad1eae411 (patch)
tree06f4f0560176011f14832d82f9e141ead7cac3f2 /gc.c
parent20b9d7b9fde83c98046eacdfcb40e8cb6607963e (diff)
downloadruby-9c5e3671ebd9c07c178ca5dac08ad15ad1eae411.tar.gz
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.
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc.c b/gc.c
index e7a1b6fb4f..dc35f77f34 100644
--- a/gc.c
+++ b/gc.c
@@ -3089,7 +3089,7 @@ rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0,
}
#endif
-VALUE
+MJIT_FUNC_EXPORTED VALUE
rb_class_allocate_instance(VALUE klass)
{
return rb_class_instance_allocate_internal(klass, T_OBJECT | ROBJECT_EMBED, RGENGC_WB_PROTECTED_OBJECT);