X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/77745d701ca519f67def45b50e91f34685ee92e3..e2737abbb702a05e83f4aa2486a941ac3964446a:/pp_hot.c diff --git a/pp_hot.c b/pp_hot.c index 6e7e384..17683ff 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2571,6 +2571,11 @@ PP(pp_aassign) if (SvRMAGICAL(hash) || HvUSEDKEYS(hash)) hv_clear(hash); + /* "nelems" was converted to the number of pairs earlier. */ + if (nelems > PERL_HASH_DEFAULT_HvMAX) { + hv_ksplit(hash, nelems); + } + /* now assign the keys and values to the hash */ dirty_tmps = FALSE;