tisonkun opened a new pull request, #231:
URL: https://github.com/apache/datasketches-rust/pull/231

   ## Summary
   
   - validate complete native T-Digest payloads once, then decode fixed-width 
centroid and buffered-value records directly from borrowed slices
   - apply the same direct decoding to the reference-compatible double and 
float formats
   - detect the reference-compatible prefix before family validation, avoiding 
a temporary error allocation on every compatible deserialize
   - preserve all value, weight, overflow, and payload-length validation 
without using unsafe code or changing the serialized format
   - add stable reference-format deserialization benchmarks and a large 
declared-payload regression test
   
   ## Performance
   
   Divan A/B runs compared this branch with `main` on the same machine, using 
at least one second and 200 samples per workload:
   
   | workload | median (`main` -> this PR) | change |
   | --- | ---: | ---: |
   | native, 512 digests with 64 centroids | 121.3 us -> 106.6 us | 12.1% 
faster |
   | native, 512 digests with 8 centroids | 21.83 us -> 19.78 us | 9.4% faster |
   | reference-compatible double, 59 centroids | 296.9 ns -> 237.4 ns | 20.0% 
faster |
   | reference-compatible float, 59 centroids | 297.0 ns -> 247.9 ns | 16.5% 
faster |
   
   Reference-compatible deserialization also drops from two allocations 
totaling 1,012 bytes to one 944-byte allocation by avoiding construction of the 
expected family-validation error.
   
   These local microbenchmarks are directional rather than a performance 
contract.
   
   ## Compatibility
   
   - the public API and serialized format are unchanged
   - C++, Java, Go, and reference-implementation snapshots continue to 
deserialize successfully
   - native f32/f64, buffered, empty, and single-value states retain their 
existing validation and behavior
   - declared payload lengths are checked before allocating, including 
reference-compatible double images
   
   ## Validation
   
   - `cargo x check`
   - `cargo x test`
   - `cargo x lint`
   - `cargo x bench`
   


-- 
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]

Reply via email to