-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fn generate_grain_{y,uv}_rust
: Replace indexing ar_lag
loops with…
… iterators to elide bounds checks (#568) This also explicitly truncates `ar_lag` to 2 bits (so `ar_lag <= ar_pad`), which it already is when being set, but the compiler can't see that (a `u2` would be appropriate). `ar_lag <= ar_pad` proves all the bounds are in-bounds, but the compiler only sees this when using slicing and iterators. There are still some bounds checks for the luma code, but that only happens once per inner loop so it's less bad. This increases perf by ~4-5% on `donna` and removes 4 bounds checks per `fn`.
- Loading branch information
Showing
1 changed file
with
32 additions
and
29 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