xxh3

A fast, pure Go port of the XXH3 hashing algorithm with SIMD-accelerated 64-bit and 128-bit variants.

Library
Go
vv1.1.0
581stars
BSD-2-Clause

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
48/100Fair
Development Activity40
Maintenance8
Community56
Maturity60
Momentum28

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
67/100Good
Architecture80
Code Quality88
Innovation65
Learning Curve35

xxh3 is a Go implementation of the XXH3 algorithm from the xxHash family, ported to match the upstream v0.8.0 output exactly. It exposes simple Hash and HashString functions for one-shot 64-bit and 128-bit hashing, plus a streaming Hasher that implements Go’s standard hash.Hash and hash.Hash64 interfaces for incremental writes.

Under the hood the package dispatches to hand-written SIMD kernels for AVX-512, AVX2, SSE2, and NEON, generated with avo and selected at runtime via CPU feature detection, falling back to a portable scalar implementation when no vector instructions are available. This makes it one of the fastest non-cryptographic hash implementations available for Go, commonly used for checksums, deduplication keys, hash table keys, and content-addressable storage where throughput matters more than cryptographic security.

What You Get

  • One-shot Hash and HashString functions for direct 64-bit hashing of byte slices and strings
  • Hash128 and Hash128Seed for 128-bit hash output via the Uint128 type
  • A streaming Hasher type implementing hash.Hash and hash.Hash64 for incremental writes
  • Seeded hashing variants (HashSeed, NewSeed) for keyed or salted hash use cases
  • Runtime CPU-feature dispatch across AVX-512, AVX2, SSE2, and NEON kernels with a scalar fallback

Common Use Cases

  • Fast checksums for deduplication and content-addressable storage
  • Hash table and map key generation where speed matters more than cryptographic guarantees
  • Streaming hashes of large files or network payloads via the Hasher interface
  • Seeded or keyed hashing for partitioning, sharding, or hash-flooding resistance

Under The Hood

Architecture The core entry point, hashAny in hash64.go, dispatches purely on input length: separate branches for 0-16, 17-128, 129-240, and 241+ bytes each mix the input against a fixed 192-byte key table with a different strategy, while the 241+ branch delegates to one of accumAVX512, accumAVX2, accumSSE, accumNEON, or accumScalar chosen at call time via cached CPU-feature flags. hasher.go layers a streaming Hasher on top of the same primitives, buffering into a block-plus-stripe byte array and calling the equivalent accumBlock* variants as data arrives, then converging through the identical merge-and-avalanche formula used by the one-shot path in Sum64/Sum128. The package is intentionally flat: aside from internal/table (shared lookup data) and internal/compare (a cgo-backed reference implementation used only in tests), everything lives in one package, and the avo/ subdirectory is a separate module used purely for code generation, excluded from normal builds via a replace directive.

Tech Stack A Go 1.22 module with a minimal runtime dependency footprint: github.com/klauspost/cpuid/v2 for CPU feature detection and golang.org/x/sys as an indirect dependency; github.com/zeebo/assert is test-only. The assembly kernels are generated through avo, a Go DSL for writing x86/ARM assembly, invoked via go generate and checked into the repo as .s files rather than generated at build time. A Makefile wraps common developer tasks and CI regenerates the assembly to catch drift.

Code Quality Correctness is validated unusually rigorously: compat_test.go contains hundreds of kilobytes of test vectors cross-checked against a cgo binding to the real upstream C xxHash library in internal/compare, so results are verified bit-for-bit against the reference implementation rather than only self-consistently. hasher_test.go asserts the streaming Hasher produces identical output to the one-shot functions across many input sizes, and escape_test.go guards against unwanted heap allocations. CI runs the test suite across three operating systems, three Go versions, and both amd64 and arm64, plus a separate job that regenerates the avo-produced assembly and fails the build on any diff. The package leans on unsafe.Pointer for zero-copy access to string and slice headers, which is deliberate and idiomatic for a hot-path hashing library but raises the bar for casual contributions; there is no CONTRIBUTING guide.

What Makes It Unique Most Go hash libraries offer at most a scalar or single-SIMD-tier implementation; this package generates and runtime-selects among four distinct vectorized kernels (AVX-512, AVX2, SSE2, NEON) plus a scalar fallback, verified against upstream C output to guarantee cross-language interoperability. The result is a hash function whose observed throughput scales with the host CPU’s capabilities without any build-time configuration, at the cost of maintaining several parallel, code-generated implementations of the same algorithm.

Used by 7 apps in this directory

Go
52%
MIT

Bytebase

Devops

14,449

An open-source database CI/CD and DevSecOps platform — schema migration review, GitOps-driven changes, data masking, and access control across MySQL, PostgreSQL, Oracle, Snowflake, MongoDB, and more.

View details
91
Repo Health
73
Technical
69
Dependency
Built with
Go52%
TypeScript39%
Updated yesterday
Go
98%
Other

Crush

Developer Tools · AI Code Assistants · AI Assistants

27,798

Your terminal coding companion — wire up any LLM with LSP intelligence, MCP extensibility, and a skills system that learns your workflow.

View details
87
Repo Health
86
Technical
69
Dependency
Built with
Go98%
Updated today
Go
79%
Apache 2.0

Dolt

Databases · Data Engineering · Developer Tools

24,298

The SQL database you can branch, merge, diff, and clone — Git for your data, MySQL-compatible and ready for multi-agent AI workflows.

View details
90
Repo Health
9
Technical
67
Dependency
Built with
Go79%
Shell20%
Updated 2 days ago
Go
99%
AGPL 3.0

MinIO

File Storage

61,375

High-performance, S3-compatible object storage built for AI/ML and analytics workloads — run it anywhere from a laptop to a petabyte-scale cluster.

View details
60
Repo Health
85
Technical
66
Dependency
Built with
Go99%
Updated 4 months ago
Go
78%
Apache 2.0

OpenMeter

Invoicing Finance · Developer Tools

2,236

Open-source metering and billing engine for AI, agentic, and DevTool monetization — ingest usage events in real time and turn them into accurate invoices automatically.

View details
86
Repo Health
81
Technical
66
Dependency
Built with
Go78%
TypeScript17%
Updated 2 days ago
Go
54%
AGPL 3.0

Uptrace

Monitoring · Devops

4,274

Unified open-source APM that collects OpenTelemetry traces, metrics, and logs into a single self-hosted platform backed by ClickHouse.

View details
63
Repo Health
70
Technical
66
Dependency
Built with
Go54%
Vue34%
Updated 2 weeks ago
Go
96%
BSD 3

Weaviate

Databases · Search

16,758

Open-source vector database combining semantic search, hybrid queries, RAG, and image search in a single cloud-native system built for production scale.

View details
91
Repo Health
85
Technical
70
Dependency
Built with
Go96%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search