jeffoodchain opened a new pull request, #264: URL: https://github.com/apache/datasketches-rust/pull/264
## Summary Remove the `rand` runtime dependency from the published `datasketches` crate and add our own random generator. KLL and REQ only require a random boolean when choosing which half of a compaction range to promote. This PR replaces those calls with a small, crate-private `random_bit()` implementation backed by a thread-local SplitMix64 generator. ## Changes - add a crate-private, thread-local SplitMix64 random-bit generator - seed each thread's generator on first use through `RandomState` - use `random_bit()` for KLL and REQ compaction decisions - remove `rand` from the `kll` and `req` feature dependency lists - remove `rand` from the published library's normal dependencies - document the dependency change in the changelog The workspace still uses `rand` for benchmarks, but downstream users of the `datasketches` crate no longer pull it in. ## Compatibility This does not change the public API or serialization format. KLL and REQ compaction remain randomized. The new generator only replaces the source of the random coin used to select which items are promoted. ## Testing - `cargo x check` - `cargo x lint` - `cargo x test` -- 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]
