2 ms·
Regexps is another area where GoLang used to lag behind Python (for certain types of expressions?). Not sure if things have changed, but this issue is still ope
by Tempest1981 7y ago
Regexps is another area where GoLang used to lag behind Python (for certain types of expressions?). Not sure if things have changed, but this issue is still open 4 years later: https://github.com/golang/go/issues/11646 https://github.com/golang/go/issues/11646
Not sure I fully understand the NFA vs DFA/re2 choices -- seem like the issue above conflicts with the comment below. Can someone clarify?
From [1]: "Go has chosen to follow the re2 path (not surprising, since Russ Cox is a major author of both Go and re2). re2 has much better performance characteristics than some other regexp engines, in that it never has an exponential slowdown, but that comes at a cost for other regexps (https://swtch.com/~rsc/regexp/ https://swtch.com/~rsc/regexp/)."
[1] https://www.reddit.com/r/golang/comments/84o986/why_is_gos_regex_so_slow/ https://www.reddit.com/r/golang/comments/84o986/why_is_gos_r...