perf: optimize k-mer pipeline with compile-time tables

This commit shifts entropy and lookup table generation to compile time via a new build script, eliminating runtime overhead. It replaces heap-allocated queues in rolling statistics with a stack-allocated, const-generic ring buffer for cache-friendly operations, and implements `size_hint` on `SuperKmerIter` for efficient iterator consumption. Additionally, it establishes the baseline profile configuration and sets global k-mer parameters.
This commit is contained in:
Eric Coissac committed 2026-05-20 15:54:20 +02:00
1 parent 9a1c0c0ee0
commit c20a1ed465
7 files changed
+472 -261

No files matched your search

+4 -1
View File
@@ -3,7 +3,7 @@ use std::path::PathBuf;
use clap::Args;
use obifastwrite::write_scatter;
use obikseq::RoutableSuperKmer;
use obikseq::{RoutableSuperKmer, set_k, set_m};
use crate::cli::{CommonArgs, PipelineData, open_chunks};
@@ -41,6 +41,9 @@ pub fn run(args: SuperkmerArgs) {
let partition_bits = args.common.partition_bits;
let n_workers = args.common.threads.max(1);
set_k(k);
set_m(m);
let path_source = args.common.seqfile_paths();
let pipe = obipipeline::make_pipe! {