Skip to content

Commit 7507941

Browse files
Replaced SSGROW with SSCHECK
Which drastically improves performance on large matches.
1 parent 5b3c3cc commit 7507941

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxopenparen _pDEPTH)
261261
);
262262
);
263263

264-
SSGROW(total_elems + REGCP_FRAME_ELEMS);
264+
SSCHECK(total_elems + REGCP_FRAME_ELEMS);
265265

266266
/* memcpy the offs inside the stack - it's faster than for loop */
267267
memcpy(&PL_savestack[PL_savestack_ix], rex->offs + parenfloor + 1, paren_bytes_to_push);

0 commit comments

Comments
 (0)