From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH] dcache: faster dentry_cmp() Date: Tue, 14 Feb 2012 17:46:24 -0800 Message-ID: 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 mga02.intel.com ([134.134.136.20]:26935 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755515Ab2BOBq1 (ORCPT ); Tue, 14 Feb 2012 20:46:27 -0500 In-Reply-To: <20120214224526.GA3478@p183.telecom.by> (Alexey Dobriyan's message of "Wed, 15 Feb 2012 01:45:27 +0300") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Alexey Dobriyan writes: > 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. I'm sure there are even better ways to do the comparision using longer words, especially as we know the boundaries and alignment. -Andi -- ak@linux.intel.com -- Speaking for myself only