From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Subject: Re: [PATCH] dcache: faster dentry_cmp() Date: Fri, 20 Apr 2012 22:06:54 +1000 Message-ID: <20120420120654.GA26894@amd.local0.net> References: <20120214224526.GA3478@p183.telecom.by> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, npiggin@kernel.dk To: Alexey Dobriyan Return-path: Received: from ipmail05.adl6.internode.on.net ([150.101.137.143]:49326 "EHLO ipmail05.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754260Ab2DTMHE (ORCPT ); Fri, 20 Apr 2012 08:07:04 -0400 Content-Disposition: inline In-Reply-To: <20120214224526.GA3478@p183.telecom.by> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Feb 15, 2012 at 01:45:27AM +0300, Alexey Dobriyan wrote: > 1) consistently use "unsigned int" for dentry name length, > 2) reuse subtraction result for return value, exact value doesn't matter > because function is only used in boolean context, > 3) use *p++ idiom for even better code. > > All of this results in performance speedup of "git diff" > which is way out of statistical error (0.4% vs 0.15% of 3 sigma): Would you have any interest to port this patch on top of Linus' latest changes there? 0.4% increase is nothing to sneeze at. There may be some improvements with the DCACHE_WORD_ACCESS code too.