Re: [PATCH 1/3]fs/inode: iunique() Optimize Performance

From: Andi Kleen
Date: Wed Nov 25 2009 - 10:06:30 EST


"Liuweni" <qingshenlwy@xxxxxxxxx> writes:

> ---
> move the if condition out the while{}.
> While the function executing, the if
> condition won't check again and again.
> And this code won't change the function
> of iunique().

Normally compiler automatically move loop invariant code out of loop
bodies. Have you verified that's not the case here?

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/