-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
faster rand(::UnitRange{Bool}) #25190
Conversation
1ff6f6a
to
3dcc479
Compare
@nanosoldier |
Your benchmark job has completed - no performance regressions were detected. A full report can be found here. cc @ararslan |
Is I ask because this PR seems to add a lot of code to optimize a weird use-case. |
Agree, this seems like a very odd corner case. |
I never used this |
Yes, but what is the use case for a dynamic value on I don't doubt that this PR makes |
I don't know, I never needed that.
I don't think so, at least in a case where e.g. you get to |
The fact that it is hard to come up with a real use-case for (I'm not opposed to a bit of defensive pre-optimization in the standard library as long as it doesn't sacrifice much in terms of code size or complexity. But that doesn't seem to be the case here.) |
Ok, let's re-open this if a convincing use-case pops-up. |
This becomes about twice as fast on my machine. The motivation is to work-around the regression I created in #25058.