-
Notifications
You must be signed in to change notification settings - Fork 159
Update rand crate to 0.5 #203
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
Conversation
|
Thanks for putting this together! If rand's minimum version is 1.22, then that should be quickcheck's version. The contract isn't 1.21, it's 1.22, even if rand happens to compile on 1.21 today.
Uh, that does indeed look pretty bad. We should figure out what's going on with strings before merging this. |
|
I'm not really comfortable with profiling Rust code on macOS yet, but running the Looking at the code, there's Lines 572 to 576 in 2143dc8
which could produce quite a lot of How this is related to |
|
I investigated the performance differences (hoping we didn't mess up too badly in Rand). I couldn't even find back the RNG when profiling! The benchmark already notes "Use a deterministic generator to benchmark on the same data", and this is the trouble. The number of shrinkages (if I understand quickcheck right) depends on the range generated by the RNG. Any change and the benchmarks can become a magnitude faster or slower. We did not change ISAAC, but did change the algorithm used in Now one is 5x faster, another 4x slower. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good to me!
Actually, I made exactly the same changes, and then found out there was an open PR 😄.
One thing that may be a good idea:
We may deprecate ISAAC someday. Also we plan to deprecate some compatibility module re-exports someday. If you change the benchmark to use rand::prng::hc128::Hc128Rng it does not have to change again in the future.
|
Sorry for taking so long to respond. I agree with @pitdicker that randomness can affect the benchmark times. I also changed benchmarks to use Hc128 as @pitdicker suggested. My feeling right now is that since benchmarks depend on how |
BurntSushi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR updates
randcrate to version 0.5.Minimum Rust version (in .travis.yml) pushed to 1.22.0.