From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Wilcox Subject: Re: [PATCH] dcache: faster dentry_cmp() Date: Tue, 14 Feb 2012 18:41:02 -0700 Message-ID: <20120215014102.GB5436@parisc-linux.org> 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 palinux.external.hp.com ([192.25.206.14]:46719 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757536Ab2BOBux (ORCPT ); Tue, 14 Feb 2012 20:50:53 -0500 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): On what machine, out of interest? -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step."