From: Jonathan Tan Date: Fri, 22 Nov 2024 18:05:30 GMT Subject: Re: [PATCH 0/7] pack-objects: Create an alternative name hash algorithm (recreated) Message-ID: <20241122180530.530499-1-jonathantanmy@google.com> In-Reply-To: Junio C Hamano writes: > I wonder if we do even better if we reverse all 8 bits instead of > swapping nybbles (if we were to do so, it might be more efficient to > shift in from the right instead of left end of the base and hash > accumulators in the loop and then swap the whole resulting word at > the end). > > Thanks for a fun read. Ah, yes, reversing is better than swapping nybbles (the least significant 2 bits have more entropy than the next-least significant 2 bits). When writing this, I didn't think of shifting in from the right (if I had thought of that, I would have indeed reversed the bits instead).