Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: bcd9e232e2cabb85c857899fbfdec11d1f28c5b5
https://github.com/Perl/perl5/commit/bcd9e232e2cabb85c857899fbfdec11d1f28c5b5
Author: Richard Leach <[email protected]>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M av.c
M pod/perldelta.pod
Log Message:
-----------
av_extend_guts: don't needlessly resize a shifted array
For a workload that is repeatedly pushing and shifting array elements,
this could cause the array to be reallocated many times over, without
the peak array size ever actually growing.
(The example case in https://github.com/Perl/perl5/issues/24865
showed the array thrashing over the same few chunk allocations.)
There are no code comments that explain why the check performed was
for `(key > *maxp - 10)` rather than just `(key > *maxp)`. It
harks back to Perl 3.0 and perhaps the original rationale no longer
applies. (Or if it does, the rationale nonetheless seems lost to time.)
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications