summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-12-01 04:52:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-12-06 21:27:11 (GMT)
commit1f7c9261320576fcaaa5b4e50ad73336b17183e8 (patch)
tree358c866f7964837cd50c059184a9735d08553a78 /Makefile
parent8d7a455ed52e2a96debc080dfc011b6bb00db5d2 (diff)
downloadgit-1f7c9261320576fcaaa5b4e50ad73336b17183e8.zip
git-1f7c9261320576fcaaa5b4e50ad73336b17183e8.tar.gz
git-1f7c9261320576fcaaa5b4e50ad73336b17183e8.tar.bz2
xdiff: drop XDL_FAST_HASH
The xdiff code hashes every line of both sides of a diff, and then compares those hashes to find duplicates. The overall performance depends both on how fast we can compute the hashes, but also on how many hash collisions we see. The idea of XDL_FAST_HASH is to speed up the hash computation. But the generated hashes have worse collision behavior. This means that in some cases it speeds diffs up (running "git log -p" on git.git improves by ~8% with it), but in others it can slow things down. One pathological case saw over a 100x slowdown[1]. There may be a better hash function that covers both properties, but in the meantime we are better off with the original hash. It's slightly slower in the common case, but it has fewer surprising pathological cases. [1] http://public-inbox.org/git/20141222041944.GA441@peff.net/ Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 0 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index f53fcc9..f610769 100644
--- a/Makefile
+++ b/Makefile
@@ -338,11 +338,6 @@ all::
#
# Define NATIVE_CRLF if your platform uses CRLF for line endings.
#
-# Define XDL_FAST_HASH to use an alternative line-hashing method in
-# the diff algorithm. It gives a nice speedup if your processor has
-# fast unaligned word loads. Does NOT work on big-endian systems!
-# Enabled by default on x86_64.
-#
# Define GIT_USER_AGENT if you want to change how git identifies itself during
# network interactions. The default is "git/$(GIT_VERSION)".
#
@@ -1485,10 +1480,6 @@ ifndef NO_MSGFMT_EXTENDED_OPTIONS
MSGFMT += --check --statistics
endif
-ifneq (,$(XDL_FAST_HASH))
- BASIC_CFLAGS += -DXDL_FAST_HASH
-endif
-
ifdef GMTIME_UNRELIABLE_ERRORS
COMPAT_OBJS += compat/gmtime.o
BASIC_CFLAGS += -DGMTIME_UNRELIABLE_ERRORS