tisonkun opened a new pull request, #261: URL: https://github.com/apache/datasketches-rust/pull/261
## Summary - add `TDigestMut::try_merge` so total-weight overflow is reported without mutating the receiver - add `TDigestMut::merge_many` to combine partial digests with one stable sort and compression pass - use the smallest `k` when merging different compression parameters, since coarser centroids cannot be split to satisfy a larger `k` - add `TDigestMut::quantiles` and `TDigest::quantiles`; nondecreasing ranks share one centroid scan, while arbitrary input order is preserved - reject malformed serialized states with unknown or conflicting flags, reversed extrema, out-of-range values, unsorted centroids, or missing stored values ## Deserialization fast path The new structural checks are fused into decoding. Centroid validity is accumulated without per-centroid error construction or a second validation pass; errors are materialized only after the payload loop. This keeps the checked API as the only public deserialization path. Local Divan runs showed no deserialization regression: the large partial-group workload was about 103 us before this change and 80-94 us after it; the small workload was about 19 us before and 17-18 us after it. ## Batch workload results Representative local Divan medians: - merging 64 partials: 102.4 us sequential, 24.4 us with `merge_many` - querying 6 ranks: 1.28 us sequential, 196 ns with `quantiles` `merge_many` trades higher temporary peak memory for avoiding intermediate recompression, which is documented on the API. ## Validation - `cargo x prepare-testdata` - `cargo x check` - `cargo x lint` - `cargo x test` - `cargo bench -p benchmarks --bench benchmarks -- tdigest::serde::deserialize tdigest::query::quantiles tdigest::merge::partials` -- 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]
