The current benchmarks show that ugrep does not yet outpaces the performance of other grep for the -ABC context matching for practical cases such as -A1, -B1 and -C1 or any (practically reasonable) context size.
With a few minor changes to the code to avoid unnecessary scanning of the input, we can improve the performance of -ABC context matching considerably, as the following new results show for MacBook Pro Intel x64 and M1 machines. For these test runs, the performance of ugrep is improved by 3x to 4x compared to the previous ugrep v4.3 performance tests. This improvement will be included with the next ugrep release cycle.
Intel x64 with AVX2: results for large text file search with context
grepping Sherlock|Holmes elapsed real time (s)
search
-A1
-B1
-C1
-winA1
-winB1
-winC1
ugrep
0.03
0.02
0.03
0.04
0.03
0.04
rg
0.03
0.03
0.03
0.09
0.09
0.09
ag
0.40
0.56
0.56
0.43
0.58
0.57
ggrep
0.13
0.13
0.14
0.30
0.30
0.31
arm64: results for large text file search with context
The current benchmarks show that ugrep does not yet outpaces the performance of other grep for the
-ABC
context matching for practical cases such as-A1
,-B1
and-C1
or any (practically reasonable) context size.With a few minor changes to the code to avoid unnecessary scanning of the input, we can improve the performance of
-ABC
context matching considerably, as the following new results show for MacBook Pro Intel x64 and M1 machines. For these test runs, the performance of ugrep is improved by 3x to 4x compared to the previous ugrep v4.3 performance tests. This improvement will be included with the next ugrep release cycle.Intel x64 with AVX2: results for large text file search with context
grepping
Sherlock|Holmes
elapsed real time (s)arm64: results for large text file search with context
grepping
Sherlock|Holmes
elapsed real time (s)