[pull] master from rust-random:master#10
Open
pull[bot] wants to merge 975 commits intomesalock-linux:masterfrom
Open
[pull] master from rust-random:master#10pull[bot] wants to merge 975 commits intomesalock-linux:masterfrom
pull[bot] wants to merge 975 commits intomesalock-linux:masterfrom
Conversation
635ce54 to
e7e72f1
Compare
- Extra testing for weighted sampling - Fix IndexedRandom::choose_multiple_weighted with very small keys - Use A-ExpJ algorithm with BinaryHeap for better performance with large length / amount
- Update version numbers - Update CHANGELOGs - Add an extra benchmark
- Move `Slice` -> `slice::Choose`, `EmptySlice` -> `slice::Empty`
- Rename trait `DistString` -> `SampleString`
- Rename `DistIter` -> `Iter`, `DistMap` -> `Map`
- Move `{Weight, WeightError, WeightedIndex}` -> `weighted::{Weight,
Error, WeightedIndex}`
- Move `weighted_alias::{AliasableWeight, WeightedAliasIndex}` ->
`weighted::{..}`
- Move `weighted_tree::WeightedTreeIndex` ->
`weighted::WeightedTreeIndex`
- [x] Added a `CHANGELOG.md` entry # Summary As discussed in #1515, this PR replaces the implementation of `poisson::RejectionMethod` with a new algorithm based on the [paper ](https://dl.acm.org/doi/10.1145/355993.355997). # Motivation The new implementation offers improved performance and maintains better sampling distribution, especially for extreme values of lambda (> 1e9). # Details In terms of performance, here are the benchmarks I ran, with the current implementation as the baseline: ```text poisson/100 time: [45.5242 cycles 45.6734 cycles 45.8337 cycles] change: [-86.572% -86.507% -86.438%] (p = 0.00 < 0.05) Performance has improved. Found 5 outliers among 100 measurements (5.00%) 2 (2.00%) low mild 2 (2.00%) high mild 1 (1.00%) high severe poisson/variable time: [5494.6626 cycles 5508.2882 cycles 5523.2298 cycles] thrpt: [5523.2298 cycles/100 5508.2882 cycles/100 5494.6626 cycles/100] change: time: [-76.728% -76.573% -76.430%] (p = 0.00 < 0.05) thrpt: [+324.27% +326.85% +329.69%] Performance has improved. Found 5 outliers among 100 measurements (5.00%) 1 (1.00%) low mild 3 (3.00%) high mild 1 (1.00%) high severe ```
Reduce the use of `zerocopy` as a step towards eliminating the dependency.
Attempt to slightly improve the wording left by #1514.
Additionally tweaks the macros to "consume" provided arguments.
Bumps the all-deps group with 11 updates: | Package | From | To | | --- | --- | --- | | [getrandom](https://github.com/rust-random/getrandom) | `0.4.0-rc.1` | `0.4.1` | | [wasip3](https://github.com/bytecodealliance/wasi-rs) | `0.3.1+wasi-0.3.0-rc-2025-09-16` | `0.4.0+wasi-0.3.0-rc-2026-01-06` | | [wasm-encoder](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wasm-metadata](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wasmparser](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wit-bindgen-core](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-bindgen-rust](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-bindgen-rust-macro](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-component](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wit-parser](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [zmij](https://github.com/dtolnay/zmij) | `1.0.17` | `1.0.19` | Updates `getrandom` from 0.4.0-rc.1 to 0.4.1 - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](rust-random/getrandom@v0.4.0-rc.1...v0.4.1) Updates `wasip3` from 0.3.1+wasi-0.3.0-rc-2025-09-16 to 0.4.0+wasi-0.3.0-rc-2026-01-06 - [Commits](bytecodealliance/wasi-rs@wasip3-0.3.1...wasip3-0.4.0) Updates `wasm-encoder` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wasm-metadata` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wasmparser` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wit-bindgen-core` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-bindgen-rust` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-bindgen-rust-macro` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-component` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wit-parser` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `zmij` from 1.0.17 to 1.0.19 - [Release notes](https://github.com/dtolnay/zmij/releases) - [Commits](dtolnay/zmij@1.0.17...1.0.19) --- updated-dependencies: - dependency-name: getrandom dependency-version: 0.4.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: wasip3 dependency-version: 0.4.0+wasi-0.3.0-rc-2026-01-06 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wasm-encoder dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wasm-metadata dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wasmparser dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen-core dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen-rust dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen-rust-macro dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-component dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-parser dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: zmij dependency-version: 1.0.19 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps the all-deps group in /benches with 19 updates: | Package | From | To | | --- | --- | --- | | [clap](https://github.com/clap-rs/clap) | `4.5.55` | `4.5.57` | | [clap_builder](https://github.com/clap-rs/clap) | `4.5.55` | `4.5.57` | | [getrandom](https://github.com/rust-random/getrandom) | `0.4.0-rc.1` | `0.4.1` | | [regex](https://github.com/rust-lang/regex) | `1.12.2` | `1.12.3` | | [regex-automata](https://github.com/rust-lang/regex) | `0.4.13` | `0.4.14` | | [regex-syntax](https://github.com/rust-lang/regex) | `0.8.8` | `0.8.9` | | [wasip3](https://github.com/bytecodealliance/wasi-rs) | `0.3.1+wasi-0.3.0-rc-2025-09-16` | `0.4.0+wasi-0.3.0-rc-2026-01-06` | | [wasm-encoder](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wasm-metadata](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wasmparser](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wit-bindgen](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-bindgen-core](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-bindgen-rust](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-bindgen-rust-macro](https://github.com/bytecodealliance/wit-bindgen) | `0.48.1` | `0.51.0` | | [wit-component](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [wit-parser](https://github.com/bytecodealliance/wasm-tools) | `0.241.2` | `0.244.0` | | [zerocopy](https://github.com/google/zerocopy) | `0.8.35` | `0.8.38` | | [zerocopy-derive](https://github.com/google/zerocopy) | `0.8.35` | `0.8.38` | | [zmij](https://github.com/dtolnay/zmij) | `1.0.17` | `1.0.19` | Updates `clap` from 4.5.55 to 4.5.57 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@clap_complete-v4.5.55...clap_complete-v4.5.57) Updates `clap_builder` from 4.5.55 to 4.5.57 - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](clap-rs/clap@v4.5.55...v4.5.57) Updates `getrandom` from 0.4.0-rc.1 to 0.4.1 - [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md) - [Commits](rust-random/getrandom@v0.4.0-rc.1...v0.4.1) Updates `regex` from 1.12.2 to 1.12.3 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](rust-lang/regex@1.12.2...1.12.3) Updates `regex-automata` from 0.4.13 to 0.4.14 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](rust-lang/regex@regex-automata-0.4.13...regex-automata-0.4.14) Updates `regex-syntax` from 0.8.8 to 0.8.9 - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](rust-lang/regex@regex-syntax-0.8.8...regex-syntax-0.8.9) Updates `wasip3` from 0.3.1+wasi-0.3.0-rc-2025-09-16 to 0.4.0+wasi-0.3.0-rc-2026-01-06 - [Commits](bytecodealliance/wasi-rs@wasip3-0.3.1...wasip3-0.4.0) Updates `wasm-encoder` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wasm-metadata` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wasmparser` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wit-bindgen` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-bindgen-core` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-bindgen-rust` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-bindgen-rust-macro` from 0.48.1 to 0.51.0 - [Release notes](https://github.com/bytecodealliance/wit-bindgen/releases) - [Commits](bytecodealliance/wit-bindgen@v0.48.1...v0.51.0) Updates `wit-component` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `wit-parser` from 0.241.2 to 0.244.0 - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) Updates `zerocopy` from 0.8.35 to 0.8.38 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](google/zerocopy@v0.8.35...v0.8.38) Updates `zerocopy-derive` from 0.8.35 to 0.8.38 - [Release notes](https://github.com/google/zerocopy/releases) - [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md) - [Commits](google/zerocopy@v0.8.35...v0.8.38) Updates `zmij` from 1.0.17 to 1.0.19 - [Release notes](https://github.com/dtolnay/zmij/releases) - [Commits](dtolnay/zmij@1.0.17...1.0.19) --- updated-dependencies: - dependency-name: clap dependency-version: 4.5.57 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: clap_builder dependency-version: 4.5.57 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: getrandom dependency-version: 0.4.1 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: regex dependency-version: 1.12.3 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: regex-automata dependency-version: 0.4.14 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: regex-syntax dependency-version: 0.8.9 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: wasip3 dependency-version: 0.4.0+wasi-0.3.0-rc-2026-01-06 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wasm-encoder dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wasm-metadata dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wasmparser dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen-core dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen-rust dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-bindgen-rust-macro dependency-version: 0.51.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-component dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: wit-parser dependency-version: 0.244.0 dependency-type: indirect update-type: version-update:semver-minor dependency-group: all-deps - dependency-name: zerocopy dependency-version: 0.8.38 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: zerocopy-derive dependency-version: 0.8.38 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps - dependency-name: zmij dependency-version: 1.0.19 dependency-type: indirect update-type: version-update:semver-patch dependency-group: all-deps ... Signed-off-by: dependabot[bot] <support@github.com>
@newpavlov this includes a number of what I think are uncontroversial changes from my other PRs and also bumps versions to allow publishing a new pre-release. I'm not committing to keeping rand_pcg in this repo but for now this is the easiest approach (I also wouldn't make changes here until after v0.10).
…ield (#1726) - [x] Added a `CHANGELOG.md` entry Depends on RustCrypto/stream-ciphers#516.
Sibling rngs PR: rust-random/rngs#103
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )