-
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 fguv_32x32xn_*
: Make {uv,is_uv,uv_pl}
args bool
s, fixing a p…
…erf regression due to bounds checks (#559) This makes `{uv,is_uv,uv_pl}` args `bool`s, casting to `c_int`/`usize` for FFI/indexing. By making the arg a `bool` in `fn fguv_32x32xn_rust` and doing the `as usize` cast inside the `fn`[1], (4[2]) bounds checks of `uv` into length-2 arrays are eliminated, fixing a perf regression. This was checked on `aarch64-unknown-linux-gnu` asm. [1] Doing the `bool` to `usize` cast inside of the `add_noise_uv` closure didn't make a difference in the number of bounds checks. [2] 27 => 23 `bl core::panicking::panic_bounds_check`s
- Loading branch information
Showing
2 changed files
with
7 additions
and
7 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