Re: [PATCH][nf-next] netfilter: replace modulo operation with bitwise AND

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Li RongQing <lirongqing@xxxxxxxxx> wrote:
> CONNTRACK_LOCKS is 1024 and power of 2, so modulo operations
> can be replaced with AND (CONNTRACK_LOCKS - 1)
> 
> and bitwise AND operation is quicker than module operation

Uh.  What kind of compiler doesn't figure that out?!

I would prefer to keep it as-is and let compiler do the optimization.



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux