gruppera
High-performance station-temperature aggregation engine, written in Rust.
Status
On 200M rows (2.6 GB, official 1BRC generator, warm cache, 4 vCPU GitHub runner) gruppera is within 5% of the 1BRC winner (thomaswue) built the way it ships, as a GraalVM native image, ties it on CPU time, and runs 1.76× faster than the winner on the JVM — with byte-identical output (bench-200m run 37402714819):
| contender | wall (best of 3) | CPU time |
|---|---|---|
| gruppera | 0.915 s | 3.35 s |
| gruppera + PGO | 0.913 s | 3.34 s |
| winner, native image (tuned flags) | 0.875 s | 3.36 s |
| winner, native image (default) | 0.885 s | 3.37 s |
| winner, OpenJDK 21 (JIT) | 1.609 s | 5.59 s |
The native image's remaining wall-time edge includes its fork trick: the parent prints and exits while a worker process still unmaps the file, so the measured wall stops before teardown; gruppera's wall includes its own munmap.
Design
- Memory-mapped input, 2MB work-stealing chunks claimed via an atomic cursor
- Three interleaved row parsers per thread to hide hash-table latency
- SWAR branchless temperature parsing into integer tenths
- Per-thread open-addressing hash tables (64-byte slots, linear probing)
- Integer-only accumulation; floating point only at output formatting
The techniques follow standard practice in high-performance text aggregation. We are grateful to the 1BRC (One Billion Row Challenge) community, whose public write-ups informed this design. This is an original implementation.
Correctness
Every push runs tests/fuzz.py: the release binary (real mmap) is diffed
against a naive reference on randomized inputs — name lengths around every
SWAR path boundary, multibyte UTF-8, 100-byte names, 10k-station multi-chunk
files, tiny files — with half the inputs ending exactly on a 4 KiB page so
any read past EOF faults. Output order matches Java's TreeMap<String>
(UTF-16 code units).
Install
Prebuilt binaries for Linux (x86_64, aarch64), macOS (arm64, x86_64) and Windows (x64) are on the releases page, and the same binaries through package managers:
| Cargo | cargo install --locked gruppera |
| npm | npm install -g gruppera |
| pip / uv | pip install gruppera · uv tool install gruppera |
| Homebrew | brew install andrey-usa/tap/gruppera |
| Scoop | scoop bucket add andrey-usa https://github.com/andrey-usa/scoop-bucket then scoop install gruppera |
The prebuilt x86_64 binaries target x86-64-v2 so they run on any CPU from
the last fifteen years. For the numbers above, build for your own machine:
cargo build --release # .cargo/config.toml sets -C target-cpu=native
Run
gruppera measurements.txt
Input is the 1BRC format, one <station>;<temperature> row per line;
output is {station=min/mean/max, ...} sorted by station name.
Contributing
See CONTRIBUTING.md.
License
Metadata
Release files for gruppera 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| gruppera-0.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| gruppera-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64, Linux musl 1.1+ x86-64 | Details |
| gruppera-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl | Python 3 | none | Linux musl 1.1+ ARM64, Linux glibc 2.17+ ARM64 | Details |
| gruppera-0.4.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| gruppera-0.4.0-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 1.1 MB
Release files / gruppera-0.4.0-py3-none-win_amd64.whl
| Download URL | gruppera-0.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 157.6 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
beaa7f4074c1e3afc0d3a7c7e95fd3e83e4879e52f1940788092b787b5d80682
|
|
BLAKE2b-256 checksum How to use checksums |
c1c683fbbdb5028cb3d3f13e5525a3cd1e1ac7bd028ed0fa1e4d5cfb73bcaa3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / gruppera-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl
| Download URL | gruppera-0.4.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64.whl |
|---|---|
| Size | 278.2 kB |
| Tags | Linux glibc 2.17+ x86-64 Linux musl 1.1+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
9556db10c2867ab21c5809f879f8d47331f1f990147527059746a9154d5f60c7
|
|
BLAKE2b-256 checksum How to use checksums |
ba7047ed80782cbcbd8d08e1caf1dc01f6797ace37383efdd5ca9c737a7f21c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / gruppera-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl
| Download URL | gruppera-0.4.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl |
|---|---|
| Size | 274.2 kB |
| Tags | Linux glibc 2.17+ ARM64 Linux musl 1.1+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
33c1b890bc6ee32e77d209b8dcca35005f99f740e4f537c47509d67bbbd89e33
|
|
BLAKE2b-256 checksum How to use checksums |
a985e22a27104c2ef7c39270bee1b4c34b30dc372117bead0625f1a080f63a4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / gruppera-0.4.0-py3-none-macosx_11_0_arm64.whl
| Download URL | gruppera-0.4.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 193.3 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
cb2a05493c79ba3074ec33bedff0a8ea9cb308030e0f6d70619e41c3ca6cdf8a
|
|
BLAKE2b-256 checksum How to use checksums |
8b36b874d127dbd52fa4979c27250e38c8a1a1c825819e3a78dd764180c38bec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency logRelease files / gruppera-0.4.0-py3-none-macosx_10_12_x86_64.whl
| Download URL | gruppera-0.4.0-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 205.1 kB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
64d88d64c74d5b1a672d83eb8ef4fc194107248766a6e2f5d19cebeef0102539
|
|
BLAKE2b-256 checksum How to use checksums |
da294d4247e38c6fd71cbe29c9f9474707608236d73802005973216c836c3427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.
Transparency log