Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The kernel's RNG is fast enough, and buffering means taking locks, which we don't want to do. So just remove all buffering. This also means the randomness we get is "fresher". That also means we don't need any locking, making this potentially faster if multiple cores are hitting GetRandom() at the same time on newer Linuxes. Also, change the build tag of the tests to be 'unix' instead of enumerating them. Change-Id: Ia773fab768270d2aa20c0649f4171c5326b71d02 Reviewed-on: https://go-review.googlesource.com/c/go/+/390038 Reviewed-by: Filippo Valsorda <valsorda@google.com> Run-TryBot: Jason Donenfeld <Jason@zx2c4.com> Auto-Submit: Jason Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
- Loading branch information
Showing
2 changed files
with
19 additions
and
45 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
3ae414c
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.
Does this affect speed in OS X?