Re: [PATCH 4/5] tree-walk: unroll get_mode since loop boundaries are well-known
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Apr 2, 2011, 09:28 UTC
- Message-ID
- <BANLkTi=QK0_P3=rGFLXzZzk7c7JSNxuBmA@mail.gmail.com>
- In-Reply-To
- <1301535481-1085-4-git-send-email-dpmcgee@gmail.com>
On Thu, Mar 31, 2011 at 8:38 AM, Dan McGee <dpmcgee@gmail.com> wrote:
> We know our mode entry in our tree objects should be 5 or 6 characters > long. This change both enforces this fact and also unrolls the parsing > of the information giving the compiler more room for optimization of the > operations.
I'm skeptical. Did you measure signficant gain after this patch? I looked at asm output with -O3 and failed to see the compiler doing anything fancy. Perhaps it's because I'm on x86 with quite small register set.
-- Duy