Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MERGE] pp_multiconcat: don't make lots of mortals
In the 'fallback to traditional concat behaviour if any args are magic' branch, the code was potentially creating lots of SvTEMPs to emulate the PADTMPs of the various OP_CONCAT, OP_CONST, etc ops it replaced. This branch reduces the number of temps required, and of the ones still needed, mostly replaces them with PADTMPs so that they don't need freeing and reallocating each time. In particular, this fixes GH #21360, whereby something like s/..../x$1/g was allocating SvTEMPs for each /g iteration, but because it only did a FREETMPs after the last iteration, memory usage grew and performance suffered, especially under Windows.
- Loading branch information
Showing
6 changed files
with
253 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters