-
Notifications
You must be signed in to change notification settings - Fork 431
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
fill_via_chunks: mutate src on BE (small optimisation) #1182
Conversation
Updated with documentation and rebase. The code is significantly nicer so probably worth merging this (when we accept breaking changes). |
Looks good! I think this only needs a CHANGELOG update. |
This is a breaking change to |
A breaking change to |
One thing which I would like to do before releasing pub trait BlockRngCore {
type Item: SealedTrait;
const ITEMS: usize;
fn generate(&mut self) -> [Self::Item; Self::ITEMS];
} It's possible today on Nightly with Such trait still has a certain deficiency around target features, e.g. IIRC with ChaCha we have to use ChaCha block size multiplied by maximum number of blocks which could be generated in parallel (i.e. on non-AVX2 targets code will be a bit less efficient than possible), but we probably can overlook it. In RustCrypto we "solved" it using emulation of rank-2 closures, but such solution is somewhat complex and does not fit well into the |
More to the point, a breaking release of So we can't release If we didn't make a breaking release of |
Breaking changes to |
This is an API-breaking change to
rand_core
but not too consequential, and results in a small performance boost on Big Endian:LE is essentially unchanged:
All numbers are smaller than expected due to #1181.
Since BE is not very popular and it's not that big a bump, we may choose not to merge this.