1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-07 09:43:00 +01:00
git/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
xemit.c Merge branch 'rs/xdiff-merge-overlapping-hunks-for-W-context' 2016-09-21 15:15:26 -07:00
xemit.h
xhistogram.c
xinclude.h
xmacros.h
xmerge.c
xpatience.c
xprepare.c
xprepare.h
xtypes.h
xutils.c xdiff: drop XDL_FAST_HASH 2016-12-06 13:27:11 -08:00
xutils.h