This is an automated email from the ASF dual-hosted git repository. alsay pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/datasketches-go.git
commit 65c977fd57636d9ed867b75e64da67d6a0c7c15c Author: Pierre Lacave <[email protected]> AuthorDate: Tue Dec 19 21:02:26 2023 +0100 Switch Murmur3 to faster implementation --- go.mod | 2 +- go.sum | 4 ++-- hll/hll_sketch.go | 4 ++-- thetacommon/theta_utils.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 53eba33..f560552 100644 --- a/go.mod +++ b/go.mod @@ -5,8 +5,8 @@ go 1.21 toolchain go1.21.1 require ( - github.com/spaolacci/murmur3 v1.1.0 github.com/stretchr/testify v1.8.4 + github.com/twmb/murmur3 v1.1.8 ) require ( diff --git a/go.sum b/go.sum index d004ff9..5103686 100644 --- a/go.sum +++ b/go.sum @@ -2,10 +2,10 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/twmb/murmur3 v1.1.8 h1:8Yt9taO/WN3l08xErzjeschgZU2QSrwm1kclYq+0aRg= +github.com/twmb/murmur3 v1.1.8/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/hll/hll_sketch.go b/hll/hll_sketch.go index c22cd89..7672f34 100644 --- a/hll/hll_sketch.go +++ b/hll/hll_sketch.go @@ -24,7 +24,7 @@ import ( "unsafe" "github.com/apache/datasketches-go/thetacommon" - "github.com/spaolacci/murmur3" + "github.com/twmb/murmur3" ) type HllSketch interface { @@ -316,5 +316,5 @@ func (h *hllSketchImpl) GetSerializationVersion() int { } func (h *hllSketchImpl) hash(bs []byte) (uint64, uint64) { - return murmur3.Sum128WithSeed(bs, thetacommon.DefaultUpdateSeed) + return murmur3.SeedSum128(thetacommon.DefaultUpdateSeed, thetacommon.DefaultUpdateSeed, bs) } diff --git a/thetacommon/theta_utils.go b/thetacommon/theta_utils.go index fbad9c5..06213b1 100644 --- a/thetacommon/theta_utils.go +++ b/thetacommon/theta_utils.go @@ -18,5 +18,5 @@ package thetacommon const ( - DefaultUpdateSeed = uint32(9001) + DefaultUpdateSeed = uint64(9001) ) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
