Repository navigation
Pari 0.4.3 alpha
Pre-releasePari 0.4.3 alpha
Pari 0.4.3 alpha makes deduplication, grouping and persistent indexes much
faster, and cuts the memory of the in-memory LSH index by about a fifth.
Installation
python -m pip install "pari-similarity==0.4.3"
cargo add pari-core@0.4.3 pari-index@0.4.3 pari-store@0.4.3Python imports remain import pari. Keep all four public Rust crates on the
same release version. CLI archives, checksums, and the dependency SBOM are
attached to the
GitHub release with
GitHub build provenance attestations.
Faster deduplication
DedupeIndex.add_many and deduplicate now collect records from Python,
build their signatures and insert them in three overlapping stages. Without
a progress callback the stages keep overlapping across batch boundaries, so
the default batch_size=1024 ingests about as fast as large batches. Batches
stay all-or-nothing: a failure keeps the earlier batches and removes the
failing one.
Grouping gathers components with flat arrays, scans the LSH bands on several
threads, and builds DuplicateGroup objects in bulk.
Measured on the dedicated 12-vCPU, 132 GiB host with 10M items:
| 10M items | 0.4.2 | 0.4.3 |
|---|---|---|
DedupeIndex(backend="memory") ingest, batch_size=65536 |
176.5 s | 60.6 s |
DedupeIndex(backend="local") ingest, batch_size=65536 |
203.7 s | 69.4 s |
DedupeIndex(backend="memory") ingest, default batch_size |
not measured | 68.8 s |
DedupeIndex(backend="local") ingest, default batch_size |
not measured | 74.3 s |
DedupeIndex.groups() |
about 25 s | 5.6 s |
DedupeIndex(backend="local") close() |
18.5 s | 11.3 s |
DedupeIndex(backend="local") peak memory |
12.46 GB | 9.37 GB |
DedupeIndex(backend="memory") peak memory |
11.28 GB | 8.17 GB |
The benchmark's own feature function accounts for about 46 s of each ingest.
Groups and the local file are identical in both releases.
Faster indexes
The in-memory LSH index fills its band tables on several threads and stores
a bucket's only member inline. Persistent indexes fill their pending band
tables on several threads, flush rewritten snapshots to disk while they are
written, scan flat columns when a large band is split for sorting, and
validate bucket directories on several threads when they open.
| 10M items | 0.4.2 | 0.4.3 |
|---|---|---|
LshIndex32 build |
47.6 s | 8.3 s |
LshIndex32 grouping |
13.3 s | 0.4 s |
LshIndex32 memory per item |
935 B | 647 B |
| Persistent index build and first sync | 85.5 s | 30.6 s |
| Persistent snapshot rewrite | 24.9 s | 14.4 s |
| Persistent index reopen | 5.0 s | 3.3 s |
Query results, groups and committed files are unchanged. Opening a large
persistent index can now hold up to five bucket-directory sections in memory
at once instead of one, about 130 MB at 10M items.
Security
The locked url dependency is updated to 2.5.9 for RUSTSEC-2026-0592.
The file format and public APIs are unchanged; files are interchangeable with
0.4.2.