Thread (1 message) 1 message, 1 author, 2016-06-15

Re: jc/lookup-object-hash from pu crashes on ARM

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:21

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help