
This commit includes updates that affects the build, testing, and deployment of Tile38. - The root level build.sh has been broken up into multiple scripts and placed in the "scripts" directory. - The vendor directory has been updated to follow the Go modules rules, thus `make` should work on isolated environments. Also some vendored packages may have been updated to a later version, if needed. - The Makefile has been updated to allow for making single binaries such as `make tile38-server`. There is some scaffolding during the build process, so from now on all binaries should be made using make. For example, to run a development version of the tile38-cli binary, do this: make tile38-cli && ./tile38-cli not this: go run cmd/tile38-cli/main.go - Travis.CI docker push script has been updated to address a change to Docker's JSON repo meta output, which in turn fixes a bug where new Tile38 versions were not being properly pushed to Docker
51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
# xxhash
|
|
|
|
[](https://godoc.org/github.com/cespare/xxhash)
|
|
|
|
xxhash is a Go implementation of the 64-bit
|
|
[xxHash](http://cyan4973.github.io/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](https://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
|
|
|
|
- [InfluxDB](https://github.com/influxdata/influxdb)
|
|
- [Prometheus](https://github.com/prometheus/prometheus)
|