Re:Python, Catastrophic Regular Expressions and the GIL (2013)
by cmacleod4 on Monday November 14, 2022 @10:21AM
(#33595257)
Need I point out that one can avoid both the issues highlighted here by just using Tcl?
Regexps in Tcl use a non-backtracking implementation which handles such cases with minimal slowdown, e.g. the example shown with 16 and 32-character inputs:
Regexps in Tcl use a non-backtracking implementation which handles such cases with minimal slowdown, e.g. the example shown with 16 and 32-character inputs:
One discussion of this can be found at https://comp.lang.tcl.narkive.com/XPVME8zS/tcl-regexp-perfor... .Tcl's threading implementation has no GIL, which not only avoids the type of lock-up described here, but also allows performance to scale to use all cores of your machine, see: https://www.hammerdb.com/blog/uncategorized/why-tcl-is-700-f... .