author | Tay Ray Chuan <rctay89@gmail.com> | |
Tue, 12 Jul 2011 06:10:27 +0000 (14:10 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 12 Jul 2011 16:30:00 +0000 (09:30 -0700) | ||
commit | 86abba801575892a8a2b161aa29518c1ed05e1f1 | |
tree | e2a5a2264646e2bbde43dfd8bff10369daec7c5b | tree | snapshot |
parent | 9f37c275938e1fbca7165872dad039874add09cd | commit | diff |
xdiff/xprepare: use a smaller sample size for histogram diff
For histogram diff, we can afford a smaller sample size and thus a
poorer estimate of the number of lines, as the hash table (rhash) won't
be filled up/grown. This is safe as the final count of lines (xdf.nrecs)
will be updated correctly anyway by xdl_prepare_ctx().
This gives us a small boost in performance.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
For histogram diff, we can afford a smaller sample size and thus a
poorer estimate of the number of lines, as the hash table (rhash) won't
be filled up/grown. This is safe as the final count of lines (xdf.nrecs)
will be updated correctly anyway by xdl_prepare_ctx().
This gives us a small boost in performance.
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xprepare.c | diff | blob | history | |
xdiff/xutils.c | diff | blob | history | |
xdiff/xutils.h | diff | blob | history |