High-performance MinHash, LSH indexing, b-bit compression, streaming deduplication & document clustering for MoonBit
moon run src/cli# End-to-end search and persistence example
moon run src/cli
# Runtime benchmark suite; output is CSV
moon run src/bench_climoon-minhash: deterministic similarity index demo
documents=3, signature_length=64, approximate_similarity=0.6875, search_hits=1, snapshot_bytes=244, restored_documents=3, f1=1src/
├── app/ reusable end-to-end application facade
├── tokenizer/ normalization, n-grams, CDC, stemming, streams, windows
├── hash/ non-cryptographic hash families and digest bundles
├── minhash/ MinHash, weighted/super signatures, ensembles, estimates
├── lsh/ banded and SimHash indexes with diagnostics
├── pipeline/ deterministic analysis, streaming, reports, validation
├── model/ records, configurations, results, limits, and aggregates
├── index/ document index, transactions, snapshots, pagination, health
├── codec/ validated snapshots, frames, inspection, and diffs
├── compress/ b-bit signatures, storage metrics, HyperLogLog
├── similarity/ edit, set, vector, and multi-metric similarity profiles
├── dedup/ batch/streaming deduplication and graph clustering
├── shard/ routing, distribution, balancing, and shard merge support
├── eval/ confusion matrices, ranking metrics, and threshold sweeps
├── cli/ end-to-end executable
└── bench_cli/ benchmark executable backed by src/benchDocumentRecord → Analyzer → DocumentFeatures → LSH candidates
↓ ↓
Snapshot codec exact verification
↓ ↓
restore/index SearchHit ranking| Workload | Iterations | Elapsed (µs) | Operations/s | Checksum |
|---|---|---|---|---|
| hash-24-word | 20 | 245.3 | 81,532.82 | 4,205,139,225 |
| analyze-document | 20 | 9,762.2 | 2,048.72 | 1,185,206,067 |
| index-search-32 | 20 | 18,600.9 | 1,075.22 | 20 |
| snapshot-encode-16 | 20 | 3,300.6 | 6,059.50 | 20 |
moon run src/bench_climoon fmt --check
moon check --deny-warn
moon test --deny-warn
moon check --target all --deny-warn
moon test --target wasm --deny-warn
moon test --target js --deny-warn.\tools\source_stats.ps1High-performance MinHash, LSH indexing, b-bit compression, streaming deduplication & document clustering for MoonBit