kache-hash: A dynamic, concurrent, and cache-efficient hash table for streaming k-mer operations
J. Khan, R. Patro, P. Pandey
Key points
From the paper's conclusion- We present kache-hash, an exact, dynamic, concurrent, and resizable hash table that places k-mers by their minimizers.
Abstract
Many computational genomic analyses spend much of their time inserting and looking up k-mers in large hash tables. These operations stream through sequences, and consecutive k-mers share k - 1 characters. General hash tables ignore this locality. Each k-mer costs them a memory access, and in concurrent builds, a synchronization. We present kache-hash, an exact, dynamic, concurrent, and resizable hash table that places k-mers by their minimizers. A run of consecutive k-mers with the same minimizer then shares its buckets, which it fetches and locks only once. Building on Iceberg hashing, kache-hash handles skewed minimizers with secondary buckets. A compact spill filter lets lookups stop early, yet stay exact. The table stores sets or maps, and doubles in place in parallel. Under a cache-residency assumption, we show that a run that stays in its primary bucket brings in at most that bucket's cache lines, however long the run is. We compare kache-hash with six general-purpose and k-mer-specific tables on five genomic datasets. At 56 threads, it builds k-mer sets 3.5--7.0x faster than the fastest baseline, and answers queries 1.5--5.4x faster. On the human genome, its positive and mixed queries fetch 3.1--3.2x fewer cache lines per k-mer than those of the fastest baseline. In PanGenie, kache-hash speeds up end-to-end genotyping 1.96x with identical outputs. In K2Rmini, it speeds up read filtering 10.7--19.4x over a fixed control version of the release, also making the filter exact. kache-hash is implemented in C++20 and is available at https://github.com/jamshed/kache-hash.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- To sort or to hash? Revisiting k-mer countingbioRxiv · 2026
- RSHash: a fast and space-efficient hash table for k-mers.Bioinformatics (Oxford, England) · 2026
- Batch, Prefetch, Skip, Orient, Squeeze: Faster, Smaller k-mer dictionaries via the Spectral Burrows-Wheeler transformbioRxiv · 2026
- Super Bloom: Fast and Precise Filter for Streaming k-Mer Queries.Journal of computational biology : a journal of computational molecular cell biology · 2026
- BIKE: A Binary $K$-mer Exact Counter with Alphabet-Independent Memory and Deterministic Parallelism.IEEE transactions on computational biology and bioinformatics · 2026
- Binary search and set operations on compacted k-mer listsbioRxiv · 2026