]> git.ipfire.org Git - thirdparty/git.git/commit
xdiff: delete redundant array xdfile_t.ha
authorEzekiel Newren <ezekielnewren@gmail.com>
Fri, 26 Sep 2025 22:41:54 +0000 (22:41 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Sep 2025 21:12:46 +0000 (14:12 -0700)
commit5c294dceb23633a8bcced946ce3f65a06038cf52
treef5122073a965900f91542311cd5876c1d6bcce33
parentf4ea812b2d930fb1825b99dc11ca186691dade99
xdiff: delete redundant array xdfile_t.ha

When 0 <= i < xdfile_t.nreff the following is true:
xdfile_t.ha[i] == xdfile_t.recs[xdfile_t.rindex[i]]

This makes the code about 5% slower. The fields rindex and ha are
specific to the classic diff (myers and minimal). I plan on creating a
struct for classic diff, but there's a lot of cleanup that needs to be
done before that can happen and leaving ha in would make those cleanups
harder to follow.

A subsequent commit will delete the chastore cha from xdfile_t. That
later commit will investigate deleting ha and cha independently and
together.

Signed-off-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xdiffi.c
xdiff/xprepare.c
xdiff/xtypes.h