Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1527bc8b authored by Peter Zijlstra's avatar Peter Zijlstra Committed by H. Peter Anvin
Browse files

bitops: Optimize hweight() by making use of compile-time evaluation



Rename the extisting runtime hweight() implementations to
__arch_hweight(), rename the compile-time versions to __const_hweight()
and then have hweight() pick between them.

Suggested-by: default avatarH. Peter Anvin <hpa@zytor.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100318111929.GB11152@aftab>
Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
LKML-Reference: <1265028224.24455.154.camel@laptop>
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent 0fdf8675
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment