Skip to main content

ratio_many

Function ratio_many 

Source
pub fn ratio_many(pairs: &[(String, String)]) -> Vec<f64>
Expand description

Exact difflib ratio for many (a, b) pairs at once, computed in parallel across all cores (rayon). ratio_many(pairs)[i] equals ratio(&pairs[i].0, &pairs[i].1), bit-for-bit.

This is the batch primitive: hand it the whole workload and the fan-out happens inside Rust — from Python it runs with the GIL released, so it saturates every core with no ThreadPoolExecutor and no per-call Python overhead.