1 // Copyright 2015 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 //go:build amd64 && !appengine && !gccgo
6 // +build amd64,!appengine,!gccgo
10 func popcnt(x word) int
11 func havePOPCNT() bool
13 var hasPOPCNT = havePOPCNT()
15 // popcount returns the population count (number of set bits) of x.
16 func popcount(x word) int {
20 return popcountTable(x) // faster than Hacker's Delight