Skip to content

Commit

Permalink
extern: Update re2 to 2023-03-01
Browse files Browse the repository at this point in the history
This might be the last update of re2 dependency for this project, as more recent
versions introduce a dependency on abseil which is against the general policy
for qgrep.

The good news is that this update seems to significantly increase regex matching
performance in some cases; it probably won't very notably affect many queries as
we have many optimizations that try to ensure we don't go to regex matching, but
some queries, when forced to match, seem to run ~3x faster on macOS/M2.
  • Loading branch information
zeux committed Aug 9, 2023
1 parent 4cdd23e commit 57dc142
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ endif()

# qgrep uses re2::Prefilter, which is not exposed by system re2
add_library(re2 STATIC
extern/re2/re2/bitmap256.cc
extern/re2/re2/bitstate.cc
extern/re2/re2/compile.cc
extern/re2/re2/dfa.cc
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ endif

SOURCES=

SOURCES+=extern/re2/re2/bitstate.cc extern/re2/re2/compile.cc extern/re2/re2/dfa.cc extern/re2/re2/filtered_re2.cc extern/re2/re2/mimics_pcre.cc extern/re2/re2/nfa.cc extern/re2/re2/onepass.cc extern/re2/re2/parse.cc extern/re2/re2/perl_groups.cc extern/re2/re2/prefilter.cc extern/re2/re2/prefilter_tree.cc extern/re2/re2/prog.cc extern/re2/re2/re2.cc extern/re2/re2/regexp.cc extern/re2/re2/set.cc extern/re2/re2/simplify.cc extern/re2/re2/stringpiece.cc extern/re2/re2/tostring.cc extern/re2/re2/unicode_casefold.cc extern/re2/re2/unicode_groups.cc
SOURCES+=extern/re2/re2/bitmap256.cc extern/re2/re2/bitstate.cc extern/re2/re2/compile.cc extern/re2/re2/dfa.cc extern/re2/re2/filtered_re2.cc extern/re2/re2/mimics_pcre.cc extern/re2/re2/nfa.cc extern/re2/re2/onepass.cc extern/re2/re2/parse.cc extern/re2/re2/perl_groups.cc extern/re2/re2/prefilter.cc extern/re2/re2/prefilter_tree.cc extern/re2/re2/prog.cc extern/re2/re2/re2.cc extern/re2/re2/regexp.cc extern/re2/re2/set.cc extern/re2/re2/simplify.cc extern/re2/re2/stringpiece.cc extern/re2/re2/tostring.cc extern/re2/re2/unicode_casefold.cc extern/re2/re2/unicode_groups.cc
SOURCES+=extern/re2/util/pcre.cc extern/re2/util/rune.cc extern/re2/util/strutil.cc
SOURCES+=extern/lz4/lib/lz4.c extern/lz4/lib/lz4hc.c

Expand Down
2 changes: 1 addition & 1 deletion extern/re2
Submodule re2 updated 67 files
+2 −2 .github/cmake.sh
+2 −2 .github/workflows/ci-bazel.yml
+2 −2 .github/workflows/ci-cmake.yml
+20 −14 .github/workflows/ci.yml
+26 −0 .github/workflows/pr.yml
+13 −0 .github/workflows/python.yml
+6 −22 BUILD
+93 −33 CMakeLists.txt
+1 −1 CONTRIBUTING.md
+30 −21 Makefile
+3 −1 README
+4 −0 SECURITY.md
+0 −8 WORKSPACE
+0 −1 doc/README.xkcd
+7 −0 doc/syntax.html
+7 −0 doc/syntax.txt
+ doc/xkcd.png
+0 −8 re2.pc
+9 −0 re2.pc.in
+44 −0 re2/bitmap256.cc
+0 −31 re2/bitmap256.h
+3 −3 re2/bitstate.cc
+53 −37 re2/compile.cc
+25 −22 re2/dfa.cc
+328 −236 re2/fuzzing/compiler-rt/include/fuzzer/FuzzedDataProvider.h
+134 −22 re2/fuzzing/re2_fuzzer.cc
+1 −1 re2/make_perl_groups.pl
+1 −1 re2/make_unicode_casefold.py
+1 −1 re2/make_unicode_groups.py
+5 −5 re2/nfa.cc
+2 −2 re2/onepass.cc
+42 −25 re2/parse.cc
+34 −34 re2/perl_groups.cc
+25 −26 re2/prefilter.cc
+23 −1 re2/prefilter.h
+67 −82 re2/prefilter_tree.cc
+3 −2 re2/prefilter_tree.h
+194 −7 re2/prog.cc
+45 −14 re2/prog.h
+84 −59 re2/re2.cc
+56 −38 re2/re2.h
+29 −20 re2/regexp.cc
+7 −2 re2/regexp.h
+5 −2 re2/set.cc
+2 −2 re2/simplify.cc
+10 −7 re2/stringpiece.h
+3 −3 re2/testing/backtrack.cc
+45 −21 re2/testing/compile_test.cc
+4 −4 re2/testing/dfa_test.cc
+2 −2 re2/testing/exhaustive_tester.cc
+2 −1 re2/testing/filtered_re2_test.cc
+1 −0 re2/testing/parse_test.cc
+31 −16 re2/testing/re2_test.cc
+83 −94 re2/testing/regexp_benchmark.cc
+61 −15 re2/testing/required_prefix_test.cc
+2 −0 re2/testing/search_test.cc
+9 −9 re2/testing/tester.cc
+1 −1 re2/tostring.cc
+2 −2 re2/unicode.py
+25 −11 re2/unicode_casefold.cc
+422 −179 re2/unicode_groups.cc
+3 −2 re2/walker-inl.h
+26 −0 re2Config.cmake.in
+4 −4 util/fuzz.cc
+23 −7 util/mutex.h
+1 −1 util/pcre.h
+4 −4 util/rune.cc
1 change: 1 addition & 0 deletions qgrep.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@
<ItemGroup>
<ClCompile Include="extern\lz4\lib\lz4.c" />
<ClCompile Include="extern\lz4\lib\lz4hc.c" />
<ClCompile Include="extern\re2\re2\bitmap256.cc" />
<ClCompile Include="extern\re2\re2\bitstate.cc" />
<ClCompile Include="extern\re2\re2\compile.cc" />
<ClCompile Include="extern\re2\re2\dfa.cc" />
Expand Down
3 changes: 3 additions & 0 deletions qgrep.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
<ClCompile Include="extern\lz4\lib\lz4hc.c">
<Filter>extern\lz4</Filter>
</ClCompile>
<ClCompile Include="extern\re2\re2\bitmap256.cc">
<Filter>extern\re2</Filter>
</ClCompile>
<ClCompile Include="extern\re2\re2\bitstate.cc">
<Filter>extern\re2</Filter>
</ClCompile>
Expand Down

0 comments on commit 57dc142

Please sign in to comment.