Subject: Re: [PATCH] Avoid extra calculation in ip_route_input_common

From: Michael Wang <[email-masked]>
Date: Wed, 21 Dec 2011 14:04:33 +0800

On 12/21/2011 01:57 PM, David Miller wrote:

> From: Michael Wang <[email-masked]>
> Date: Wed, 21 Dec 2011 13:12:03 +0800
> 
>> From: Michael Wang <[email-masked]>
>>
>> If previous condition doesn't meet, the later check will be cancelled.
>> So we don't need to do all the calculation.
>>
>> Signed-off-by: Michael Wang <[email-masked]>
> 
> This is intentional to reduce the number of branch prediction
> misses, please don't change this.
> 
> Once we read one of these values, the rest are incredibly cheap,
> the real cost is if we have tons of real branches here, each
> of which can be mispredicted.
> 

Hi, David

Thanks for your detailed explain, now I know the reason we use this style :)

Thanks,
Michael Wang