popcount

package
v0.0.0-...-6fe4f4e Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 0 Imported by: 0

README

Exercise 2.3 (P45)

Rewrite PopCount to use a loop instead of a single expression. Compare the performance of two versions. (Section 11.4 shows how to compare the performance of different implementations systematically.)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PopCountLoop

func PopCountLoop(x uint64) int

PopCountLoop returns the population count (number of set bits) of x by looping.

func PopCountTable

func PopCountTable(x uint64) int

PopCountTable returns the population count (number of set bits) of x by table-lookup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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