gotosocial/vendor/github.com/zeebo/xxh3
kim 07207e71e9
[performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575)
* update go-structr => v0.2.0

* update readme

* whoops, fix the link
2024-01-26 12:14:10 +00:00
..
.gitignore [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
_compat.c [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
accum_generic.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
accum_stubs_amd64.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
accum_stubs_other.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
accum_vector_avx512_amd64.s [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
accum_vector_avx_amd64.s [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
accum_vector_sse_amd64.s [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
consts.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
hash64.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
hash64_seed.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
hash128.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
hash128_seed.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
hasher.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
LICENSE [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
Makefile [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
README.md [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00
utils.go [performance] cache library performance enhancements (updates go-structr => v0.2.0) (#2575) 2024-01-26 12:14:10 +00:00

XXH3

GoDoc Sourcegraph Go Report Card

This package is a port of the xxh3 library to Go.

Upstream has fixed the output as of v0.8.0, and this package matches that.


Benchmarks

Run on my i7-8850H CPU @ 2.60GHz

Small Sizes

Bytes Rate
0 0.74 ns/op
1-3 4.19 ns/op (0.24 GB/s - 0.71 GB/s)
4-8 4.16 ns/op (0.97 GB/s - 1.98 GB/s)
9-16 4.46 ns/op (2.02 GB/s - 3.58 GB/s)
17-32 6.22 ns/op (2.76 GB/s - 5.15 GB/s)
33-64 8.00 ns/op (4.13 GB/s - 8.13 GB/s)
65-96 11.0 ns/op (5.91 GB/s - 8.84 GB/s)
97-128 12.8 ns/op (7.68 GB/s - 10.0 GB/s)

Large Sizes

Bytes Rate SSE2 Rate AVX2 Rate
129 13.6 ns/op (9.45 GB/s)
240 23.8 ns/op (10.1 GB/s)
241 40.5 ns/op (5.97 GB/s) 23.3 ns/op (10.4 GB/s) 20.1 ns/op (12.0 GB/s)
512 69.8 ns/op (7.34 GB/s) 30.4 ns/op (16.9 GB/s) 24.7 ns/op (20.7 GB/s)
1024 132 ns/op (7.77 GB/s) 48.9 ns/op (20.9 GB/s) 37.7 ns/op (27.2 GB/s)
100KB 13.0 us/op (7.88 GB/s) 4.05 us/op (25.3 GB/s) 2.31 us/op (44.3 GB/s)