summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorAlexander Nikolov <sasho648@gmail.com>2022-11-20 00:27:26 +0200
committerYves Orton <demerphq@gmail.com>2023-02-07 21:22:53 +0800
commit92373dea9d7bcc0a017f20cb37192c1d8400767f (patch)
tree6083b6bff9c554546b432f7be47cf3e14a5de234 /regexec.c
parentce8f481253f8f6250878c58247f4d8fee6a3a3ce (diff)
downloadperl-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/regexec.c b/regexec.c
index eeaa40e90f..92154c555b 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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);