re2j icon indicating copy to clipboard operation
re2j copied to clipboard

Resolve regex groups when performing match opertion in one pass.

Open suhothayan opened this issue 11 months ago • 0 comments
trafficstars

By default, RE2J does not resolve all the groups when performing a match operation, rather it only resolves groups when Matcher.group(*) is called. This results in input being processed twice. Once during find() and then again during group(*). This increase the latency when Matcher.find() and Matcher.group(*) are called in succession.

The request here is to allow resolving all the regex groups when Matcher.find() is called, such that when Matcher.group(*) is called, the groups can be served from cache.

Pull Request and Performance results are here : https://github.com/google/re2j/pull/178

suhothayan avatar Nov 26 '24 09:11 suhothayan