-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-System.Runtimehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors
Milestone
Description
swiftlang/swift#39143 (Apache license)
Currently we use a simple rejection loop for generating int/long in a range
runtime/src/libraries/System.Private.CoreLib/src/System/Random.Xoshiro128StarStarImpl.cs
Line 91 in c746b8b
| public override int Next(int maxValue) |
(Note that our existing algorithm is dropping high bits of the raw random result to minimize the rejections. If we can avoid doing that possibly it would improve the distribution?).
(I'm ignoring our legacy seeded impl which prefers reproducibility)
PaulusParssinen
Metadata
Metadata
Assignees
Labels
area-System.Runtimehelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributors