popcount

package
v0.0.0-...-8cd4330 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2018 License: MIT Imports: 0 Imported by: 0

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopCountClears

func PopCountClears(x uint64) int

PopCountClears returns the population count (number of set bits) of x by clearing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL