Delete custom FastRandom from ThreadPool#47338
Merged
stephentoub merged 2 commits intodotnet:masterfrom Jan 22, 2021
Merged
Conversation
|
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
jkotas
reviewed
Jan 22, 2021
src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems
Outdated
Show resolved
Hide resolved
jkotas
approved these changes
Jan 22, 2021
- Consolidates 128/256-bit variants of Xoshiro** into the same class name - Uses that from ThreadPool instead of its custom xorshift-based algorithm Throughput stays the same (~2.5ns per next random value) and incurs just one additional object allocation per thread pool thread.
danmoseley
reviewed
Jan 22, 2021
src/libraries/System.Private.CoreLib/src/System/Random.Xoshiro256StarStarImpl.cs
Outdated
Show resolved
Hide resolved
7e74a60 to
86fe512
Compare
akoeplinger
reviewed
Jan 22, 2021
| <SupportsX86Intrinsics Condition="'$(Platform)' == 'x64' or ('$(Platform)' == 'x86' and '$(TargetsUnix)' != 'true')">true</SupportsX86Intrinsics> | ||
| <ILLinkSharedDirectory>$(MSBuildThisFileDirectory)ILLink\</ILLinkSharedDirectory> | ||
| <Is64Bit Condition="'$(Platform)' == 'arm64' or '$(Platform)' == 'x64'">true</Is64Bit> | ||
| </PropertyGroup> |
Member
There was a problem hiding this comment.
/cc @nealef we'll need to remember to do the same change for s390x once we mirror this to runtimelab.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Throughput stays the same (~2.5ns per next random value) and incurs just one additional object allocation per thread pool thread.
Follow-up to #47085
cc: @kouvel