Repository navigation
Commit 7dbd904
committed
Take byte_length off the row framework
Measured against develop through #9136's own public-path bench, the RowFn port
was 7.6-7.7x slower across every arm at 65536 rows (13.5us to 104us, divan
fastest and median of 100 samples, best of two ABBA runs, Apple M4 Max). The
non-nullable arms regressed as hard as the nullable ones, so this was never
about masking or validity.
Half of it was a defect worth recording: BytesLen::get called
VarBinViewArray::views once per row, which is a host-buffer downcast, a
vortex_expect whose panic path the optimizer cannot hoist, a length division and
a slice reconstruction. Pointing Varying at the views slice instead took it from
104us to 52us. Bytes::get had the same bug. This is the trap the InputElement::get
doc warns about, and the next person to add an element should assume Varying is
load-bearing rather than decorative.
The other half is not a defect. Develop's views().iter().map(...).collect()
vectorizes to better than one row per cycle, while a strided four-byte field read
widened to eight does not. The row executor itself is fine: row_checked_add hits
0.21ns per row on the same machine, matching both a specialized control and
develop's byte_length, while reading two input columns instead of one. So
byte_length is the outlier, and it is the case #9128 already excludes, where a
row is not the natural unit of work.
Reverting the port leaves Bytes, BytesColumn and BytesLen with no caller, so they
go too, along with the two branch-only byte benches. Shout keeps its coverage as
a test-local element, since it was the crate's only non-dense-safe input and
therefore the only in-crate exercise of the Filter contract and of branch-and-skip
agreeing with filter-and-scatter. The two compile_fail doctests move to inline
elements; both were verified against a positive control, which caught two bugs in
the rewrite where they had been failing for unrelated reasons.
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>1 parent 926f459 commit 7dbd904
12 files changed
Lines changed: 270 additions & 633 deletions
File tree
- vortex-array
- benches
- src/scalar_fn
- fns
- row
- element
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | 282 | | |
292 | 283 | | |
293 | 284 | | |
This file was deleted.
This file was deleted.
0 commit comments