From: Antriksh Pany Date: Tue, 05 Apr 2011 23:55:24 GMT Subject: Re: [PATCH 4/5] tree-walk: unroll get_mode since loop boundaries are well-known Message-ID: In-Reply-To: On Mon, Apr 4, 2011 at 10:33 PM, Dan McGee wrote: > .... > Totally agree; I should have tried to do it this way in the first > place. However, compiling the fixed-length 0 to 5 loop does not > produce fully-unrolled assembly for me with CFLAGS="-march=native > -mtune=native -O2 -pipe -g" on x86_64. I see two copies of the loop > only, and even worse is the (lack of) performance (each is the mode of > 3 runs). Compilers are stupid apparently. > .... Can you try -O3? Or an explicit '-funroll-loops'? gcc I think does not do aggressive speed optimizations at the cost of space when at O2. Cheers Antriksh