git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: grep vs git grep performance?

From
Joe Perches <joe@perches.com>
Date
Oct 27, 2017, 23:22 UTC
Message-ID
<1509146542.1914.19.camel@perches.com>
In-Reply-To
<877evgxmu7.fsf@evledraar.booking.com>
On Sat, 2017-10-28 at 00:11 +0200, Ævar Arnfjörð Bjarmason wrote:
> On Fri, Oct 27 2017, Joe Perches jotted:
[]
Show 5 quoted lines
> > git grep performance has already been
> > quite successfully improved.
> 
> ...and I have WIP patches to use the PCRE engine for patterns without -P
> which I intend to start sending soon after the next release.

One addition that would be quite nice would be an option to have regex matches span input lines.

grep v2.54 was the last grep version that allowed this and I keep it around just for that.

ie:

$ cat hello.txt Hello World $ grep -P "Hello\s*World" hello.txt $ grep-2.5.4 -P "Hello\s*World" hello.txt Hello World

Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 11 of 12 in “grep vs git grep performance?”
  1. Joe PerchesOct 26, 2017
  2. Han-Wen NienhuysOct 26, 2017
  3. Joe PerchesOct 26, 2017
  4. SZEDER GáborOct 26, 2017
  5. Joe PerchesOct 26, 2017
  6. Stefan BellerOct 26, 2017
  7. Joe PerchesOct 26, 2017
  8. Stefan BellerOct 26, 2017
  9. Joe PerchesOct 27, 2017
  10. Ævar Arnfjörð BjarmasonOct 27, 2017
  11. Joe PerchesOct 27, 2017
  12. Ævar Arnfjörð BjarmasonOct 28, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.