On Wed, Sep 04, 2002 at 11:24:25PM -0700, David S. Miller wrote:
>
> B) I despise the (1 << ...htable_bits) construct, used in several places.
> It's nothing but obfuscation. Please reinstate ...htable_size, and
> use that, the code will be more readable.
>
> You despise, but the processor doesn't. Less data loads
> means the code goes faster.
Please explain. I don't think that matters here:
Both _bits and _size are unsigned int, same amount of stuff to load.
The one single per-packet-path use is in hash_conntrack(), where
the _bits thing can be used without touching the _size thing.
All other places where the patch now uses _bits, really need _size,
and do the ugly computation by shifting. And all those other places
are called very rarely.
So, I don't see how your (abstractly true) observation is relevant, here.
best regards
Patrick
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 07 2002 - 22:00:24 EST