Expand description
Vectorized kernels (perf/02 section 3, perf/11).
Tier 1 policy throughout: plain scalar Rust in fixed-shape loops the compiler auto-vectorizes, measured before anything fancier. No per-ISA intrinsics; portable std::simd goes behind a feature only where a bench proves tier 1 short. Comparison kernels build the predicate bitmap a word at a time, one u64 per 64 rows, so the inner loop has no per-row store or branch.
Structs§
- TrimSet
- The characters a trim takes off, in the form the loop wants them.
Enums§
- BinOp
- CmpOp
- MathOp
- One of the numeric functions of one argument, with the digit count ROUND was written with. A second argument that is not a constant is not this op: the compiler leaves that call to the row engine rather than reading a column per row inside a loop that is here to avoid exactly that.
- Math
Pair - One of the numeric functions over two numbers: POWER, LOG and MOD under its function spelling.
- StrCut
- Which end of a string a substring function counts from.
- StrFold
- Which fold a call asked for.
- StrLen
- Which length a call asked for.
- StrNorm
- Which of the two normalization functions a call asked for.
- StrTrim
- Which ends a trim takes characters off.
Functions§
- binary
- Evaluate
l op rinto a new flat vector. The full vector is computed regardless of selection: the loop is branch-free and cheaper than gathering, and selections keep their meaning positionally. - compact
- Compact a selected vector to a flat unselected one. Word-addressed types move 8 or 16 bytes per surviving row; validity compacts with the rows. Constant vectors just shrink their logical length.
- compare
- Compare two vectors of the same physical type into
out, which must be sized to the vector length and cleared (or freshly allocated). - cot
- The cotangent, written once and called from both engines.
- count_
valid - Non-null row count under the selection.
- cut
- Evaluate
cut(s, n)into a new flat string vector. - duration_
between - The duration that carries
fromtoto, over two vectors of the same temporal type. - element_
ids - The identifiers of a chunk’s nodes, which is
n:and then the table and the row each node sits at. - fold
- Evaluate
op(v)into a new flat string vector. - gather_
u64 - out[i] = src[idx[i]]. The loop is unrolled by four so the loads overlap; indices are u32 because gather sources (decoded groups) are bounded by group size, not vector size.
- hash64
- Mix a 64-bit key. Full-avalanche: every input bit flips ~half the output bits, which is what a radix-partitioned join table needs from both ends of the hash.
- hash_
slice - Hash a slice of keys into
out. Unrolled by four so the multiply chains of neighboring keys overlap instead of waiting on the loop bookkeeping. - intersect_
sorted - Intersect two sorted, duplicate-free slices into
out, returning the element count.outmust hold at leastmin(a.len(), b.len()). - length
- Evaluate
op(v)into a new flat integer vector. - max_i64
- Extreme of the valid rows, None when every row is null.
- min_i64
- Extreme of the valid rows, None when every row is null.
- normalize
- Evaluate
NORMALIZE(v, form)into a new flat string vector. - normalized
- Write
v IS [NOT] NORMALIZED formintoout, which must be sized to the vector and cleared. - pair
- Evaluate
op(l, r)into a new flat vector. - sum_f64
- sum_i64
- Wrapping sum of an Int64-domain vector. The no-null no-selection flat case is the B3 scan+sum inner loop and must stay a bare reduction the auto-vectorizer folds.
- trim
- Evaluate
ends(v, set)into a new flat string vector. - unary
- Evaluate
op(v)into a new flat vector.