From: Zhang Shengju
Date: Tue, 29 Aug 2017 11:18:39 +0800
> Replace shift instead of expensive divide.
>
> Signed-off-by: Zhang Shengju
The divide is more easier to understand, and it costs the same
as a shift if the types are unsigned.
I'm not applying silly changes like this which actually
On Tue, 2017-08-29 at 11:18 +0800, Zhang Shengju wrote:
> Replace shift instead of expensive divide.
This change is mostly pointless.
Any half-way decent compiler should produce the same object.
gcc emits the same object with the old code.
The AMAP_GET_BITS macro uses the "offsetof(struct, member