Discover Packages
github.com/ray-g/gopl
ch02
ex2.05
package
Version:
v0.0.0-...-8cd4330
Opens a new window with list of versions in this module.
Published: Jun 28, 2018
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Exercise 2.5 (P45)
The expressionx&(x-1)
clears the rightmost no-zero bit of x
.
Write a version of PopCount
that counts bits by using this fact, and assess its performance.
Expand ▾
Collapse ▴
Documentation
¶
PopCountClears returns the population count (number of set bits) of x by clearing.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.