prometheus/vendor/github.com/cespare/xxhash
Krasi Georgiev 5b8ff9b8a4
Merge the 2.13 release branch (#6169)
* Include tsdb tool in builds (#6085) (#6089)

Add the tsdb tool to promu so that it's included in the release
tarballs.

Signed-off-by: Ben Kochie <superq@gmail.com>

* web/ui: fix for CVE-2019-10215 (#6098)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* cut 2.13 release (#6099)

Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>

* Fix panic in ARM builds of Prometheus (#6110)

An extra sync.Pool was added during a refactor which caused some 64 bit,
atomically accessed variables to no longer be 64 bit aligned. By moving
all atomically accessed variables to the beginning of the struct they
are guaranteed to be 64 bit aligned.

Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>

* promql: fix potential panic in the query logger (#6094)

Signed-off-by: Simon Pasquier <spasquie@redhat.com>

* Cut release 2.13.1 (#6145)

Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
2019-10-18 02:21:58 +03:00
..
v2 Merge the 2.13 release branch (#6169) 2019-10-18 02:21:58 +03:00
go.mod discovery/gce: oauth2.NoContext is deprecated, replace with context.Background() (#5024) 2018-12-20 14:45:18 +00:00
go.sum discovery/gce: oauth2.NoContext is deprecated, replace with context.Background() (#5024) 2018-12-20 14:45:18 +00:00
LICENSE.txt vendor: add fabx/tsdb 2017-02-07 03:42:02 -08:00
README.md update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
rotate.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
rotate19.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
xxhash.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
xxhash_amd64.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
xxhash_amd64.s update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
xxhash_other.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
xxhash_safe.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00
xxhash_unsafe.go update tsdb to version v0.3.0 (#4953) 2018-12-04 19:46:31 +03:00

xxhash

GoDoc

xxhash is a Go implementation of the 64-bit xxHash algorithm, XXH64. This is a high-quality hashing algorithm that is much faster than anything in the Go standard library.

The API is very small, taking its cue from the other hashing packages in the standard library:

$ go doc github.com/cespare/xxhash                                                                                                                                                                                              !
package xxhash // import "github.com/cespare/xxhash"

Package xxhash implements the 64-bit variant of xxHash (XXH64) as described
at http://cyan4973.github.io/xxHash/.

func New() hash.Hash64
func Sum64(b []byte) uint64
func Sum64String(s string) uint64

This implementation provides a fast pure-Go implementation and an even faster assembly implementation for amd64.

Benchmarks

Here are some quick benchmarks comparing the pure-Go and assembly implementations of Sum64 against another popular Go XXH64 implementation, github.com/OneOfOne/xxhash:

input size OneOfOne cespare (purego) cespare
5 B 416 MB/s 720 MB/s 872 MB/s
100 B 3980 MB/s 5013 MB/s 5252 MB/s
4 KB 12727 MB/s 12999 MB/s 13026 MB/s
10 MB 9879 MB/s 10775 MB/s 10913 MB/s

These numbers were generated with:

$ go test -benchtime 10s -bench '/OneOfOne,'
$ go test -tags purego -benchtime 10s -bench '/xxhash,'
$ go test -benchtime 10s -bench '/xxhash,'

Projects using this package