This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
Integer divsion might panic if null values in array: unchecked division #437
Labels
bug
Something isn't working
no-changelog
Issues whose changes are covered by a PR and thus should not be shown in the changelog
The null values are often ignore in a division operation. This allows for less branching and thus more performant vectorized execution.
However the values behind the null mask often are zero. If we do integer division, this panics, even though the values are "masked out/invalid". I wanted to add https://doc.rust-lang.org/nightly/std/intrinsics/fn.unchecked_div.html but that is nightly only. :(
I don't know if there is a stable way to do unchecked division.
_edit:
Another option might be a more expensive division implementation where we take slices of valid values and only impelment the division on those.
_
The text was updated successfully, but these errors were encountered: