tisonkun opened a new pull request, #289: URL: https://github.com/apache/datasketches-rust/pull/289
## Summary Follow-ups building on #287: - **Collecting small digests skips the merge heap.** When the combined weight of collected inputs is at most `k / 2`, no two centroids fit under the K_2 limit, so `FromIterator<TDigestMut>` now takes the same sort path as mixed compressed/buffered inputs, which already skips the merge scan at those counts. Output is bit-identical to the heap path. - **`cdf` and `pmf` share one pass over centroid weights.** Each split point previously paid two linear weight scans inside `rank`; prefix weights are now computed once and each point costs two binary searches. Integer prefix differences keep results bit-identical. The `tdigest::query::cdf_100` benchmark improves from ~3.7 µs to ~2.3 µs. - **Simplifications.** Dropped redundant empty checks in the `TDigestMut` query wrappers (the view layer already answers empty digests; `rank` keeps its check because the empty digest's sentinel extrema would otherwise misanswer out-of-range values), and merged the near-identical `COMPAT_DOUBLE` / `COMPAT_FLOAT` deserialization arms behind a `CompatLayout` enum. Error messages remain byte-identical. The aggregation benchmarks gain shapes with a combined weight of at most `k / 2`; `serialized_owned` is ~10% faster there and other shapes are unchanged. ## Test plan - `cargo x check`, `cargo x lint`, `cargo x test` - New regression test `test_from_iter_concatenates_small_compressed_inputs` pins the no-merge collection output, including weighted mean ties and both reverse-merge directions. - Bit-identical behavior verified with randomized differential probes against the base revision: 20k collected-digest merges (serialized bytes plus a quantile sweep), ~2.3k cdf/pmf/rank state fingerprints over normal and crafted images, and 250 malformed or truncated compat deserialization cases (including error messages). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
