From: git@jeffhostetler.com
To: git@vger.kernel.org
Cc: gitster@pobox.com, peff@peff.net,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: [PATCH v6 0/3] read-cache: speed up add_index_entry
Date: Thu, 6 Apr 2017 16:34:39 +0000 [thread overview]
Message-ID: <20170406163442.36463-1-git@jeffhostetler.com> (raw)
From: Jeff Hostetler <jeffhost@microsoft.com>
Version 6 combines the strcmp_offset() function and unit tests
into a single commit and places it first in the history, so that
it can be isolated into a separate patch series if desired. It
also clarifies the return value when the strings are equal. The
commit message for the actual speed up now includes the perf
numbers (rather than having them here in the cover letter).
================
Teach add_index_entry_with_check() and has_dir_name()
to avoid index lookups if the given path sorts after
the last entry in the index.
This saves at least 2 binary searches per entry.
This improves performance during checkout and read-tree because
merge_working_tree() and unpack_trees() processes a list of already
sorted entries.
Jeff Hostetler (3):
read-cache: add strcmp_offset function
p0004-read-tree: perf test to time read-tree
read-cache: speed up add_index_entry during checkout
Makefile | 1 +
cache.h | 1 +
read-cache.c | 64 ++++++++++++++++++++++-
t/helper/.gitignore | 1 +
t/helper/test-strcmp-offset.c | 64 +++++++++++++++++++++++
t/perf/p0004-read-tree.sh | 117 ++++++++++++++++++++++++++++++++++++++++++
t/t0065-strcmp-offset.sh | 11 ++++
7 files changed, 258 insertions(+), 1 deletion(-)
create mode 100644 t/helper/test-strcmp-offset.c
create mode 100755 t/perf/p0004-read-tree.sh
create mode 100755 t/t0065-strcmp-offset.sh
--
2.9.3
next reply other threads:[~2017-04-06 16:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 16:34 git [this message]
2017-04-06 16:34 ` [PATCH v6 1/3] read-cache: add strcmp_offset function git
2017-04-06 23:07 ` René Scharfe
2017-04-07 18:04 ` Jeff Hostetler
2017-04-06 16:34 ` [PATCH v6 2/3] p0004-read-tree: perf test to time read-tree git
2017-04-06 16:34 ` [PATCH v6 3/3] read-cache: speed up add_index_entry during checkout git
2017-04-07 4:46 ` [PATCH v6 0/3] read-cache: speed up add_index_entry Jeff King
2017-04-07 18:27 ` Jeff Hostetler
2017-04-08 10:43 ` Jeff King
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=20170406163442.36463-1-git@jeffhostetler.com \
--to=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jeffhost@microsoft.com \
--cc=peff@peff.net \
/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;
as well as URLs for NNTP newsgroup(s).