diff options
author | Alexander Nikolov <sasho648@gmail.com> | 2022-11-20 00:27:26 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2023-02-07 21:22:53 +0800 |
commit | 92373dea9d7bcc0a017f20cb37192c1d8400767f (patch) | |
tree | 6083b6bff9c554546b432f7be47cf3e14a5de234 /regexec.c | |
parent | ce8f481253f8f6250878c58247f4d8fee6a3a3ce (diff) | |
download | perl-92373dea9d7bcc0a017f20cb37192c1d8400767f.tar.gz |
Replaced SSGROW with SSCHECK inside regcppush
Observed is huge slow-down on Win32 machines
with many leveled nested recursive patterns.
Bottleneck identified to be SSGROW reallocations
inside regcppush.
Replacing with SSCHECK yields huge performance gains
(to the extened for it to be called a "fix") on said platform.
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -262,7 +262,7 @@ S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxopenparen _pDEPTH) ); ); - SSGROW(total_elems + REGCP_FRAME_ELEMS); + SSCHECK(total_elems + REGCP_FRAME_ELEMS); /* memcpy the offs inside the stack - it's faster than for loop */ memcpy(&PL_savestack[PL_savestack_ix], rex->offs + parenfloor + 1, paren_bytes_to_push); |