git-commit-vandalism/xdiff
Jeff King 1f7c926132 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>
2016-12-06 13:27:11 -08:00
..
xdiff.h diff: improve positioning of add/delete blocks in diffs 2016-09-19 10:25:11 -07:00
xdiffi.c xdiff: rename "struct group" to "struct xdlgroup" 2016-09-27 10:06:24 -07:00
xdiffi.h diff: add --ignore-blank-lines option 2013-06-19 15:17:45 -07:00
xemit.c Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context' 2016-09-21 15:15:26 -07:00
xemit.h diff: add --ignore-blank-lines option 2013-06-19 15:17:45 -07:00
xhistogram.c
xinclude.h
xmacros.h
xmerge.c Merge branch 'ps/plug-xdl-merge-leak' 2016-02-26 13:37:22 -08:00
xpatience.c diff: fix a double off-by-one with --ignore-space-at-eol 2016-07-11 11:55:53 -07:00
xprepare.c xdiff/xprepare: fix a memory leak 2016-03-04 15:51:08 -08:00
xprepare.h
xtypes.h
xutils.c xdiff: drop XDL_FAST_HASH 2016-12-06 13:27:11 -08:00
xutils.h diff: add --ignore-blank-lines option 2013-06-19 15:17:45 -07:00