You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That would require the compiler to move the check for presence of a null buffer outside of the loop and generate two optimized loops, one for nullable and one for non-null arrays.
The text was updated successfully, but these errors were encountered:
In a simplified example, llvm is able to completely unswitch a loop based on the presence of a validity bitmap, and generate two separately optimized versions of a kernel: https://rust.godbolt.org/z/sxhsh3h7G
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Shortly discussed in #1048 (comment)
The calls to
is_valid
do not seem to get inlined inPrimitiveIter
and some other places, leading to slower than optimal performance.Describe the solution you'd like
Mark
ArrayData::is_valid/is_null
asinline
and also addis_valid_unchecked
methods for use in trusted code.Could also try using a
ScalarBuffer
from #1825 and a separate bitmap instead of aPrimitiveArray
field in the iterator.Describe alternatives you've considered
Additional context
Ideally I'd like code like the following the be completly inlined and basically be equivalent to a memcpy:
That would require the compiler to move the check for presence of a null buffer outside of the loop and generate two optimized loops, one for nullable and one for non-null arrays.
The text was updated successfully, but these errors were encountered: