-
Notifications
You must be signed in to change notification settings - Fork 161
Comparing changes
Open a pull request
base repository: google/re2j
base: re2j-1.7
head repository: google/re2j
compare: master
- 7 commits
- 16 files changed
- 5 contributors
Commits on Jun 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3e685d9 - Browse repository at this point
Copy the full SHA 3e685d9View commit details
Commits on Jul 10, 2022
-
Add fast path for ASCII case folding
One of our production services uses re2j to match several hundred mostly case-insensitive patterns of varying complexity against text. We observed that approximately 12% of CPU time was being spent in toLowerCase() as called from simpleFold(), due to the necessity of doing at least one character data lookup per Inst.Rune in the common case that the input rune being examined did not match the instruction. As a fix, implement a method equalsIgnoreCase() that performs Unicode-aware case-insensitive comparison between two runes, with a fast path for the common case where both input runes are ASCII, and use it in Inst for single-rune case-insensitive comparison. This takes character data lookups out of the hot path. The existing re2j benchmarks did not exercise case-insensitive patterns, so add a new benchmark that executes a mostly ASCII regex pattern on a text containing a mix of ASCII and Unicode characters (generated using a Hungarian "lorem ipsum" text generator). Also add unit tests for the new equality comparison logic. Signed-off-by: Máté Szabó <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dc7d6e5 - Browse repository at this point
Copy the full SHA dc7d6e5View commit details
Commits on Jul 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for e3c736d - Browse repository at this point
Copy the full SHA e3c736dView commit details
Commits on Aug 21, 2023
-
Add support for
(?<name>expr)
.This follows google/re2@6148386 (and golang/go@ee61186) to some extent.
Configuration menu - View commit details
-
Copy full SHA for 9b3f052 - Browse repository at this point
Copy the full SHA 9b3f052View commit details
Commits on Aug 29, 2023
-
Reduce the incidence of infinite loops while case folding
dc7d6e5 unfortunately increases the incidence of infinite loops during case folding if re2j is running on a JVM newer than the version used to generate the bundled UnicodeTables.java and the input contains a rune that would require special case folding rules to form a closed fold loop. \u1C80 (Cyrillic Small Letter Rounded Ve) is an example of such a rune. Workaround the issue by inverting the order of parameters passed to equalsIgnoreCase() so that the rune from the pattern being matched, rather than the input content, undergoes case folding instead. This does not fully eliminate the possibility of an infinite loop in this scenario, since the pattern may well contain one of the problematic runes, but it effectively restores the situation as it was pre dc7d6e5, since the previous logic also performed case folding on the rune from the pattern and not on the content. Signed-off-by: Máté Szabó <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 10ba78d - Browse repository at this point
Copy the full SHA 10ba78dView commit details
Commits on Oct 24, 2023
-
Minor test fixes to enable running internally with Blaze.
PiperOrigin-RevId: 574899560
Configuration menu - View commit details
-
Copy full SHA for 7339d54 - Browse repository at this point
Copy the full SHA 7339d54View commit details
Commits on Oct 25, 2023
-
Use an explicit "UTF-8" character set argument when creating Strings …
…from bytes. The platform default character set is guaranteed to be UTF-8. PiperOrigin-RevId: 576577338
1Configuration menu - View commit details
-
Copy full SHA for 97df44e - Browse repository at this point
Copy the full SHA 97df44eView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff re2j-1.7...master