Skip to content

searcher: multiline search

Administrator requested to merge fa/multiline into master

Created by: attfarhan

Multiline search implementation for searcher.

Test plan: Added unit tests

Benchstat output:

BytesToLowerASCII/short-8                            10.8ns ± 5%     9.7ns ± 7%  -10.14%  (p=0.000 n=8+10)
BytesToLowerASCII/pangram-8                          6.95ns ± 5%    8.98ns ±37%     ~     (p=0.810 n=10+10)
BytesToLowerASCII/8k-8                                691ns ± 5%     940ns ±52%     ~     (p=0.468 n=10+10)
BytesToLowerASCII/8k-misaligned-8                     707ns ± 6%    1299ns ±38%  +83.68%  (p=0.000 n=10+9)
ConcurrentFind_large_fixed-8                         10.7ms ± 5%    18.0ms ± 6%  +68.46%  (p=0.000 n=10+10)
ConcurrentFind_large_fixed_casesensitive-8           8.38ms ± 2%    7.59ms ± 3%   -9.38%  (p=0.000 n=9+10)
ConcurrentFind_large_re_dotstar-8                    20.9ms ± 3%    19.8ms ± 2%   -5.37%  (p=0.000 n=10+10)
ConcurrentFind_large_re_common-8                     13.0ms ± 3%     5.1ms ±10%  -60.55%  (p=0.000 n=10+10)
ConcurrentFind_large_re_anchor-8                      141ms ± 2%     128ms ± 1%   -9.56%  (p=0.000 n=10+8)
ConcurrentFind_large_path/path_only-8                 527µs ± 5%     506µs ± 6%   -3.91%  (p=0.029 n=10+10)
ConcurrentFind_large_path/content_only-8             7.35ms ± 6%    8.36ms ± 7%  +13.66%  (p=0.000 n=10+10)
ConcurrentFind_large_path/both_path_and_content-8    7.81ms ± 3%    8.74ms ± 3%  +11.90%  (p=0.000 n=9+10)
ConcurrentFind_small_fixed-8                          213µs ± 2%     159µs ± 5%  -25.05%  (p=0.000 n=10+10)
ConcurrentFind_small_fixed_casesensitive-8            127µs ± 5%      82µs ± 3%  -35.41%  (p=0.000 n=10+10)
ConcurrentFind_small_re_dotstar-8                    1.98ms ± 5%    1.62ms ± 2%  -18.13%  (p=0.000 n=10+10)
ConcurrentFind_small_re_common-8                      351µs ± 5%     143µs ± 5%  -59.36%  (p=0.000 n=10+10)
ConcurrentFind_small_re_anchor-8                     2.32ms ± 6%    1.93ms ± 4%  -16.81%  (p=0.000 n=9+10)

name                                               old alloc/op   new alloc/op   delta
BytesToLowerASCII/short-8                             0.00B          0.00B          ~     (all equal)
BytesToLowerASCII/pangram-8                           0.00B          0.00B          ~     (all equal)
BytesToLowerASCII/8k-8                                0.00B          0.00B          ~     (all equal)
BytesToLowerASCII/8k-misaligned-8                     0.00B          0.00B          ~     (all equal)
ConcurrentFind_large_fixed-8                         5.00MB ± 0%    5.01MB ± 0%   +0.35%  (p=0.002 n=10+9)
ConcurrentFind_large_fixed_casesensitive-8           12.7kB ± 5%    11.5kB ± 5%   -9.35%  (p=0.000 n=10+9)
ConcurrentFind_large_re_dotstar-8                    33.2MB ± 0%    22.7MB ± 0%  -31.43%  (p=0.000 n=10+10)
ConcurrentFind_large_re_common-8                     2.69MB ± 0%    1.76MB ± 1%  -34.51%  (p=0.000 n=10+10)
ConcurrentFind_large_re_anchor-8                     2.49MB ± 3%    1.65MB ± 3%  -33.76%  (p=0.000 n=10+10)
ConcurrentFind_large_path/path_only-8                  630B ± 1%      632B ± 1%     ~     (p=0.466 n=10+9)
ConcurrentFind_large_path/content_only-8             93.1kB ± 5%    69.1kB ± 2%  -25.70%  (p=0.000 n=10+10)
ConcurrentFind_large_path/both_path_and_content-8    94.3kB ± 3%    69.2kB ± 6%  -26.55%  (p=0.000 n=9+10)
ConcurrentFind_small_fixed-8                          474kB ± 6%     393kB ±19%  -17.04%  (p=0.000 n=9+10)
ConcurrentFind_small_fixed_casesensitive-8           5.03kB ± 1%    4.45kB ± 0%  -11.54%  (p=0.000 n=10+9)
ConcurrentFind_small_re_dotstar-8                    2.81MB ± 0%    1.96MB ± 0%  -30.38%  (p=0.000 n=10+10)
ConcurrentFind_small_re_common-8                     58.3kB ± 1%    42.4kB ± 1%  -27.32%  (p=0.000 n=10+10)
ConcurrentFind_small_re_anchor-8                     19.7kB ± 2%    18.0kB ± 1%   -8.61%  (p=0.000 n=10+9)

name                                               old allocs/op  new allocs/op  delta
BytesToLowerASCII/short-8                              0.00           0.00          ~     (all equal)
BytesToLowerASCII/pangram-8                            0.00           0.00          ~     (all equal)
BytesToLowerASCII/8k-8                                 0.00           0.00          ~     (all equal)
BytesToLowerASCII/8k-misaligned-8                      0.00           0.00          ~     (all equal)
ConcurrentFind_large_fixed-8                            209 ± 2%       196 ± 1%   -6.56%  (p=0.000 n=10+9)
ConcurrentFind_large_fixed_casesensitive-8              116 ± 0%       103 ± 0%  -11.21%  (p=0.000 n=10+10)
ConcurrentFind_large_re_dotstar-8                      278k ± 0%      215k ± 0%  -22.65%  (p=0.000 n=10+9)
ConcurrentFind_large_re_common-8                      23.9k ± 0%     19.0k ± 0%  -20.70%  (p=0.000 n=10+10)
ConcurrentFind_large_re_anchor-8                      22.7k ± 0%     18.1k ± 0%  -20.45%  (p=0.000 n=9+9)
ConcurrentFind_large_path/path_only-8                  16.0 ± 0%      16.0 ± 0%     ~     (all equal)
ConcurrentFind_large_path/content_only-8                640 ± 0%       513 ± 0%  -19.91%  (p=0.000 n=10+10)
ConcurrentFind_large_path/both_path_and_content-8       640 ± 0%       513 ± 0%  -19.95%  (p=0.000 n=10+10)
ConcurrentFind_small_fixed-8                           85.8 ± 1%      77.3 ± 3%   -9.88%  (p=0.000 n=9+10)
ConcurrentFind_small_fixed_casesensitive-8             60.0 ± 0%      56.0 ± 0%   -6.67%  (p=0.000 n=10+10)
ConcurrentFind_small_re_dotstar-8                     21.7k ± 0%     16.9k ± 0%  -22.20%  (p=0.000 n=10+10)
ConcurrentFind_small_re_common-8                        485 ± 0%       395 ± 0%  -18.51%  (p=0.000 n=10+10)
ConcurrentFind_small_re_anchor-8                        208 ± 0%       179 ± 0%  -13.94%  (p=0.000 n=10+10)

Merge request reports

Loading