random: Improve RandomMixin::randbits
The previous randbits code would, when requesting more randomness than available in its random bits buffer, discard the remaining entropy and generate new. Benchmarks show that it's usually better to first consume the existing randomness and only then generate new ones. This adds some complexity to randbits, but it doesn't weigh up against the reduced need to generate more randomness.
This commit is contained in:
1 parent
9b14d3d2da
commit
21ce9d8658
3 files changed
+71
-18
No files matched your search
@@ -76,3 +76,4 @@ shift-base:crypto/
|
||||
shift-base:streams.h
|
||||
shift-base:FormatHDKeypath
|
||||
shift-base:xoroshiro128plusplus.h
|
||||
shift-base:RandomMixin<*>::randbits
|
||||
Reference in new issue
Block a user