1
0
mirror of https://github.com/golang/go synced 2024-11-18 14:14:46 -07:00
go/container/intsets
Alan Donovan b7f0150d16 container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386
This function accounts for 2% of "godoc -analysis=pointer"
and this change makes it twice as fast---and simpler.

Added test and benchmark.

Change-Id: I8578fa42dce34df057d81f6c522a7b4e0506d09d
Reviewed-on: https://go-review.googlesource.com/15211
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
2015-10-01 19:57:28 +00:00
..
popcnt_amd64.go container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386 2015-10-01 19:57:28 +00:00
popcnt_amd64.s container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386 2015-10-01 19:57:28 +00:00
popcnt_generic.go container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386 2015-10-01 19:57:28 +00:00
sparse_test.go container/intsets: Intersects, SubsetOf, SymmetricDifference(With) 2015-01-14 20:51:28 +00:00
sparse.go container/intsets: Intersects, SubsetOf, SymmetricDifference(With) 2015-01-14 20:51:28 +00:00
util_test.go container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386 2015-10-01 19:57:28 +00:00
util.go container/intsets: popcount: use POPCNT on amd64, Hacker's Delight algorithm on 386 2015-10-01 19:57:28 +00:00