Re: [PATCH 5/5] tree-walk: match_entry microoptimization
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Apr 2, 2011, 09:06 UTC
- Message-ID
- <BANLkTikZ=eH-Jdd-kdvw4JKPbqCr7kviZg@mail.gmail.com>
- In-Reply-To
- <1301535481-1085-5-git-send-email-dpmcgee@gmail.com>
On Thu, Mar 31, 2011 at 8:38 AM, Dan McGee <dpmcgee@gmail.com> wrote:
> Before calling strncmp(), see if we can get away with checking only the > first character of the passed path components instead. > > Signed-off-by: Dan McGee <dpmcgee@gmail.com>
I wonder if inlining strcmp() would be better (at least cleaner code). It seems like you try to avoid the function call cost here.
-- Duy