In the common case of predicate evaluation on primitive types, we can likely improve performance as follows:
- doing the comparisons while ignoring nullability and selectedness (any null or unselected cells may have junk data, which causes a junk comparison result)
- take the resulting bitmask of comparison results and use bitwise ops to account for null/unselected cells to ensure that those result in a 'false' comparison
For some types of comparisons this can result in SIMD operations. For others, at least, this will remove most branches from the path. This should speed up queries like TPCH Q6 which spends 25% of its time in predicate evaluation.