-
-
Notifications
You must be signed in to change notification settings - Fork 2
Replace mod le with utils
#38
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
Merged
Conversation
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
Member
Author
|
Member
Author
|
I continue to find microbenchmarks consistently inconsistent. Compared to the Also |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CHANGELOG.mdentrySummary
Move:
Word,Sealedinto new modwordletoutilsReplace
lefns:fill_bytes_via_nextwithfill_bytes_via_next_word(from Replaceblockmodule with helper functions #24)next_u32_via_fillandnext_u64_via_fillwithnext_word_via_fill(new)read_u32_intoandread_u64_intowithread_words(from Replaceblockmodule with helper functions #24, modified to usecopy_from_sliceinstead ofTryFrom)fill_via_chunks(removed)Relax restrictions on
<G as Generator>::OutputinDebugimpl forBlockRng(reverting the restriction added in #36) since this complicatesReseedingRng'sDebugimpl and we don't really need to print the index.Details
This implements much of the code changes from #24 to the
lemodule with some differences (see above).Documentation is expanded slightly (one example) but omits much of the extras. Perhaps the extra doc examples should be turned into tests?
Benches
Relative to the current
masterbranch, benchmarks of rust-random/rand#1690 show around 8% fasterrandom_bytes/thread(due to inlining?) and 8% slowerrandom_u64/thread(surprising since the relevant code,BlockRng::next_u64_from_u32, should be unaffected).