Add the RowFn scalar function framework - #9353
Open
connortsui20 wants to merge 17 commits into
Open
Conversation
Merging this PR will improve performance by 11.36%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | slice_primitive_tight_loop[10000] |
473.8 µs | 423.7 µs | +11.82% |
| ⚡ | Simulation | slice_dict_tight_loop[10000] |
770.1 µs | 691 µs | +11.45% |
| ⚡ | Simulation | compress_fsst[(1000, 64, 4)] |
1,006.5 µs | 908.3 µs | +10.81% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ct/row-fn-framework (58c9e85) with develop (ca7f626)
Footnotes
-
89 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
connortsui20
force-pushed
the
ct/row-fn-framework
branch
from
August 11, 2026 16:04
92e8d51 to
2ceb889
Compare
connortsui20
marked this pull request as ready for review
August 11, 2026 16:05
This was referenced Aug 11, 2026
connortsui20
marked this pull request as draft
August 11, 2026 16:24
connortsui20
force-pushed
the
ct/row-fn-framework
branch
from
August 11, 2026 17:12
2ceb889 to
899b19a
Compare
Introduce typed row execution with self-contained kernel arguments and explicit execution contracts. Validate decoded lengths once per batch while preserving specialized mixed-constant loops. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Cover RowFn executor overhead and strict validity policies with focused microbenchmarks. Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
connortsui20
force-pushed
the
ct/row-fn-framework
branch
from
August 11, 2026 17:35
899b19a to
6fdcd8e
Compare
connortsui20
marked this pull request as ready for review
August 11, 2026 18:48
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Adds shared batch execution for strict scalar functions written as typed row kernels. The framework centralizes input validation, decoding, constants, validity, output construction, and deferred errors.
Progress towards:
RowFnAPI #9129RowFnover Vortex arrays #9130For reviewers, read bottom to top (at least on the GitHub UI), as most of the important definitions are in those bottom files.
What changes are included in this PR?
Defines typed row dispatch, prepared inputs, owned outputs, output sinks, validity-aware batch strategies, and encoding-aware reductions. All supported tuple arities get indexed traversal, while unary and binary kernels keep specialized sources. Boundary checks reject invalid lengths, dtypes, and nulls before a kernel output escapes.
This PR deliberately has no production adopter. A paired pre-RowFn benchmark would therefore be meaningless; #9345 is the first performance gate. Focused executor controls and the reproducible comparison runner are isolated in #9351.
What APIs are changed? Are there any user-facing changes?
Adds the public
RowFn,RowVisitor,InputElement,OutputElement, andOutputSink<Options>APIs. EveryRowFnautomatically implementsScalarFnVTable; existing vtables can delegate throughrow_fn_return_dtypeandexecute_rows.InputElementandOutputSinkare unsafe to implement because their contracts support unchecked reads and uninitialized output.