]> git.ipfire.org Git - thirdparty/git.git/commit
fast-export: use a flex array to store anonymized entries
authorJeff King <peff@peff.net>
Tue, 23 Jun 2020 15:24:58 +0000 (11:24 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Jun 2020 02:56:26 +0000 (19:56 -0700)
commit55b01456a95ac8d92b04d58b874459f3bf70ad2c
treee221ec694686b857e44b038d971568f4af25dd62
parenta0f65641dfb67ffa94f1e33ded2cbab8d77d53a5
fast-export: use a flex array to store anonymized entries

Now that we're using a separate keydata struct for hash lookups, we have
more flexibility in how we allocate anonymized_entry structs. Let's push
the "orig" key into a flex member within the struct. That should save us
a few bytes of memory per entry (a pointer plus any malloc overhead),
and may make lookups a little faster (since it's one less pointer to
chase in the comparison function).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fast-export.c