Skip to content

Commit

Permalink
support for 1.9 bit counts
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Fitzgerald committed Aug 28, 2017
1 parent c0127ce commit e2d3b02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions popcnt_amd64.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// +build !go1.9
// +build amd64,!appengine

TEXT ·hasAsm(SB),4,$0-1
Expand Down
10 changes: 5 additions & 5 deletions popcnt_cmp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"testing"
)

func TestPopcntSlice(t *testing.T) {
func TestComparePopcntSlice(t *testing.T) {
s := []uint64{2, 3, 5, 7, 11, 13, 17, 19, 23, 29}
resGo := popcntSliceGo(s)
resAsm := popcntSliceAsm(s)
Expand All @@ -18,7 +18,7 @@ func TestPopcntSlice(t *testing.T) {
}
}

func TestPopcntMaskSlice(t *testing.T) {
func TestComparePopcntMaskSlice(t *testing.T) {
s := []uint64{2, 3, 5, 7, 11, 13, 17, 19, 23, 29}
m := []uint64{31, 37, 41, 43, 47, 53, 59, 61, 67, 71}
resGo := popcntMaskSliceGo(s, m)
Expand All @@ -28,7 +28,7 @@ func TestPopcntMaskSlice(t *testing.T) {
}
}

func TestPopcntAndSlice(t *testing.T) {
func TestComparePopcntAndSlice(t *testing.T) {
s := []uint64{2, 3, 5, 7, 11, 13, 17, 19, 23, 29}
m := []uint64{31, 37, 41, 43, 47, 53, 59, 61, 67, 71}
resGo := popcntAndSliceGo(s, m)
Expand All @@ -38,7 +38,7 @@ func TestPopcntAndSlice(t *testing.T) {
}
}

func TestPopcntOrSlice(t *testing.T) {
func TestComparePopcntOrSlice(t *testing.T) {
s := []uint64{2, 3, 5, 7, 11, 13, 17, 19, 23, 29}
m := []uint64{31, 37, 41, 43, 47, 53, 59, 61, 67, 71}
resGo := popcntOrSliceGo(s, m)
Expand All @@ -48,7 +48,7 @@ func TestPopcntOrSlice(t *testing.T) {
}
}

func TestPopcntXorSlice(t *testing.T) {
func TestComparePopcntXorSlice(t *testing.T) {
s := []uint64{2, 3, 5, 7, 11, 13, 17, 19, 23, 29}
m := []uint64{31, 37, 41, 43, 47, 53, 59, 61, 67, 71}
resGo := popcntXorSliceGo(s, m)
Expand Down

0 comments on commit e2d3b02

Please sign in to comment.