diff --git a/CHANGELOG.md b/CHANGELOG.md index 14b4346..7c20e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,14 @@ Sections commonly used: Features, Bug fixes, Other changes. ### Other changes +- Production genome indexing now enables caps-sa 0.7's bounded geometric LCP + memoization through its stable policy API. On the complete ruSTAR-shaped + GRCh38 plus GENCODE v50 fixture (6.56 billion symbols, 6.18 billion retained + suffixes, 1.40 million segments, 32 physical cores), the final caps-sa 0.7 + implementation built the SA in 172.953 s versus 267.592 s for its original + 0.7 baseline: 35.4% faster, with peak RSS reduced from 10,512,408 to + 9,169,892 KiB. The complete output hash was unchanged. + - `cluster_seeds` reuses its window-bin map across reads on a thread instead of rebuilding it per read. Merging two windows re-keys every bin in the merged span, so the per-read pre-sizing was only a floor and the map diff --git a/Cargo.lock b/Cargo.lock index 9f77c86..c98c649 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -174,9 +174,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "caps-sa" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be62f8675f16876a7f29cfd8b26cc18dcc52eca05a8428d530cc7036b2269f30" +checksum = "e46cbd8870dc17f488813e4c5499ff1bdc2feedb9a650ca2b597933943101394" dependencies = [ "rayon", "tempfile", diff --git a/Cargo.toml b/Cargo.toml index 8a4638f..831e694 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ chrono = "0.4" tempfile = "3" bitflags = { version = "2.12.1", features = ["std"] } shlex = "2.0.1" -caps-sa = "0.6" +caps-sa = "0.7" # mimalloc as the global allocator. Two reasons: # 1. **Memory return**: glibc malloc creates one arena per worker # thread (rayon spawns ~num_cpus workers + sub-threads) and diff --git a/src/index/sa_build.rs b/src/index/sa_build.rs index a23a53d..113e72c 100644 --- a/src/index/sa_build.rs +++ b/src/index/sa_build.rs @@ -633,7 +633,13 @@ fn dispatch_caps_sa_segmented( ); if use_ext_mem(n) { - let opts = caps_sa_ext_mem_opts(temp_dir); + // The production segmented genome-plus-junction layout contains many + // long shared contexts across phase-4 partition merges. Enable caps-sa's + // bounded, partition-local geometric LCP memoization with its measured + // defaults. The policy remains explicit here: caps-sa itself defaults + // to the direct kernel for generic inputs. + let opts = caps_sa_ext_mem_opts(temp_dir) + .lcp_memoization(caps_sa::LcpMemoizationPolicy::geometric()); // Predicate accepts ACGT only (rejects N at 4, spacer at 5). // Borrows `original` via `&[u8]` — `Send + Sync` is satisfied. let original_ref: &[u8] = original;