Git development
 help / color / mirror / Atom feed
From: Fredrik Kuivinen <frekui@gmail.com>
To: git@vger.kernel.org
Cc: bonzini@gnu.org, dpotapov@gmail.com, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 0/5] Speed up string search routines
Date: Sun, 21 Aug 2011 00:40:03 +0200	[thread overview]
Message-ID: <20110820224003.GA2199@fredrik-Q430-Q530> (raw)

This is v2 of a series sent a long time ago, in February 2010. The
patches speed up git grep and pickaxe by using the string search
routines from GNU grep.

Changes since v1:

* Rebased on top of current master.

* obstack.[ch] is now in compat/ (comment by Junio)

* kwset.[ch] is from the latest GNU grep commit which uses GPLv2. The
  newer commits uses GPLv3, which is incompatible with GPLv2 used by
  Git. There are no significant changes between the two. (pointed out
  by Dmitry Potapov and Paolo Bonzini)

* Two new tests for git grep are fixed by this code, see patch 5 for
  details.

In v1 Paolo pointed out that the kwset code is never used with more
than one string and therefore a much simpler Boyer-Moore search would
be sufficient (a kwset containing only one string uses a Boyer-Moore
search). However, the Boyer-Moore search implemented in kwset cannot
deal with case-insensitive searches, so the more complicated code is
still there.

---

Fredrik Kuivinen (5):
      Add obstack.[ch] from EGLIBC 2.10
      Add string search routines from GNU grep
      Adapt the kwset code to Git
      Use kwset in pickaxe
      Use kwset in grep


 Makefile               |    4 
 compat/obstack.c       |  441 +++++++++++++++++++++++++++
 compat/obstack.h       |  509 ++++++++++++++++++++++++++++++++
 diffcore-pickaxe.c     |   34 +-
 grep.c                 |   66 +++-
 grep.h                 |    2 
 kwset.c                |  771 ++++++++++++++++++++++++++++++++++++++++++++++++
 kwset.h                |   63 ++++
 t/t7008-grep-binary.sh |    4 
 9 files changed, 1860 insertions(+), 34 deletions(-)
 create mode 100644 compat/obstack.c
 create mode 100644 compat/obstack.h
 create mode 100644 kwset.c
 create mode 100644 kwset.h

                 reply	other threads:[~2011-08-20 22:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110820224003.GA2199@fredrik-Q430-Q530 \
    --to=frekui@gmail.com \
    --cc=bonzini@gnu.org \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox