Increase the frozen_strings table initial size
It was set to 1000 in a4a2b9be7a55bb61d17cf9673ed0d2a93bb52d31. However on ruby-2.7.0p0, there are much more than 1k frozen string right after boot: ``` $ ruby -robjspace -e 'p ObjectSpace.each_object(String).select { |s| s.frozen? && ObjectSpace.dump(s).include?(%{"fstring":true})}.uniq.count' 5948 ```
This commit is contained in:
parent
940cd3b916
commit
26ffd6e409
Notes:
git
2020-02-06 10:38:53 +09:00
2
vm.c
2
vm.c
@ -3344,7 +3344,7 @@ Init_vm_objects(void)
|
||||
/* initialize mark object array, hash */
|
||||
vm->mark_object_ary = rb_ary_tmp_new(128);
|
||||
vm->loading_table = st_init_strtable();
|
||||
vm->frozen_strings = st_init_table_with_size(&rb_fstring_hash_type, 1000);
|
||||
vm->frozen_strings = st_init_table_with_size(&rb_fstring_hash_type, 10000);
|
||||
}
|
||||
|
||||
/* top self */
|
||||
|
Loading…
x
Reference in New Issue
Block a user