From: Jeff King Date: Fri, 30 Mar 2018 21:26:56 GMT Subject: Re: [PATCH v7 13/13] pack-objects: reorder members to shrink struct object_entry Message-ID: <20180330212656.GK14782@sigill.intra.peff.net> In-Reply-To: <20180324063353.24722-14-pclouds@gmail.com> On Sat, Mar 24, 2018 at 07:33:53AM +0100, Nguyễn Thái Ngọc Duy wrote: > Previous patches leave lots of holes and padding in this struct. This > patch reorders the members and shrinks the struct down to 80 bytes > (from 136 bytes, before any field shrinking is done) with 16 bits to > spare (and a couple more in in_pack_header_size when we really run out > of bits). Out of curiosity, did you count this yourself, or did you double-check with a few compilers to make sure they all produce the same result? So having read the whole thing now, I think most of my original concerns have been addressed. I do think readability takes a hit, but it's not _too_ bad. There are a few things that have become more brittle, but I can't think of anything on the horizon that would bite us. -Peff