Skip to content

Commit 0fdd578

Browse files
committed
Reduce startup size of PL_strtab
Perl 5.26 was using 512 as the default HvMAX for PL_strtab this was increased in 528 to 2048, but we can start with a lower value. Note, that compiled programs using B::C would use one accurate value from startup. Changelog:
1 parent 7ab4a13 commit 0fdd578

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: perl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ perl_construct(pTHXx)
353353
/* SHAREKEYS tells us that the hash has its keys shared with PL_strtab,
354354
* which is not the case with PL_strtab itself */
355355
HvSHAREKEYS_off(PL_strtab); /* mandatory */
356-
hv_ksplit(PL_strtab, 1 << 11);
356+
hv_ksplit(PL_strtab, 1 << 9); /* 5.26: 1 << 9 = 512 ; 5.28: 1 << 11 = 2048 */
357357
}
358358

359359
Zero(PL_sv_consts, SV_CONSTS_COUNT, SV*);

0 commit comments

Comments
 (0)