-
-
Couldn't load subscription status.
- Fork 476
No usize except uniform #1487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No usize except uniform #1487
Conversation
|
At this point, we can remove the internal |
e950543 to
01c3e1f
Compare
|
Some regressions are quite substantial, do we understand why? E.g.: |
More half-baked thoughts:
I just pushed a slightly different impl of |
|
Adding support for |
Given that the I'd like to get some more general benchmarking done, but decided to push #1490 first. |
This is not required with 32-bit usize
c8745e7 to
7bdd833
Compare
|
Rebased. Running benches now... |
|
Comparing In summary, the Overall, benchmark results are probably a smidgen worse, with most of the differences likely due to different inlining. I find this acceptable (given our goal of portable ranged |
- Add UniformUsize - Support ..end and ..=ub range syntax for unsigned ints
- Add UniformUsize - Support ..end and ..=ub range syntax for unsigned ints
Implementations of `Distribution<T> for StandardUniform` was removed for all SIMD types containing `isize` and `usize` following the removal of implementations for `isize` and `usize` in the `rand` crate. See rust-random/rand#1487 for details. There is a new `UniformUsize` distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is needed.
Implementations of `Distribution<T> for StandardUniform` for all SIMD types containing `isize` and `usize` now generate random values using `fill_bytes()`. Uniform distribution for `isize` and `usize` was removed from `rand` crate. See rust-random/rand#1487 for details. There is a new `UniformUsize` distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is required.
Implementations of `Distribution<T> for StandardUniform` for all SIMD types containing `isize` and `usize` now generate random values using `fill_bytes()`. Uniform distribution for `isize` and `usize` was removed from `rand` crate. See rust-random/rand#1487 for details. There is a new `UniformUsize` distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is required.
Implementations of `Distribution<T> for StandardUniform` for all SIMD types containing `isize` and `usize` now generate random values using `fill_bytes()`. Uniform distribution for `isize` and `usize` was removed from `rand` crate. See rust-random/rand#1487 for details. There is a new `UniformUsize` distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is required.
Implementations of `Distribution<T> for StandardUniform` for all SIMD types containing `isize` and `usize` now generate random values using `fill_bytes()`. Uniform distribution for `isize` and `usize` was removed from `rand` crate. See rust-random/rand#1487 for details. There is a new `UniformUsize` distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is required.
Implementations of `Distribution<T> for StandardUniform` for all SIMD types containing `isize` and `usize` now generate random values using `fill_bytes()`. Uniform distribution for `isize` and `usize` was removed from `rand` crate. See rust-random/rand#1487 for details. There is a new `UniformUsize` distribution, but it is limited to a maximum value under u32::MAX for portability across 32/64bits and for use as array indexes and lengths. Probably it is not suitable if a real uniform distribution is required.
CHANGELOG.mdentrySummary
This is #1471 without
Rng::gen_index. Since we can't haveUniformUsizewithout directly supportingusizeinRng::gen_rangethis is probably the best way to go.