Jonathan Nieder [off-list ref] writes:
Even better could be to start aligning the hashes we pass around,
using something like this:
union object_hash {
unsigned char sha1[20];
uint32_t chunk[5];
};
which could speed up functions like hashcpy(), hashcmp(), and
hasheq(). But it's probably not worth the fuss.
The "flag" field in struct ref_list should be moved down to assure
alignment.
struct ref_list {
struct ref_list *next;
unsigned char flag; /* ISSYMREF? ISPACKED? */
unsigned char sha1[20];
unsigned char peeled[20];
char name[FLEX_ARRAY];
};
I am very tempted to take that "union" approach (modulo that I would call
that an "object_name") in the longer run, though.