popcount

package
v0.0.0-...-94c99f4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Write a version of `PopCount` that counts bits by shifting its argument through 64 bit positions, testing the rightmost bit each time. Compare its performance to the table-lookup version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByLookup

func ByLookup(x uint64) int

ByLookup returns the population count (number of set bits) of x.

func ByShifting

func ByShifting(x uint64) int

ByShifting returns the population count (number of set bits) of x by shifting.

Types

This section is empty.

Jump to

Keyboard shortcuts

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