Skip to content

Commit 7dbd904

Browse files
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/Cargo.toml‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,6 @@ harness = false
279279
name = "slice_dict_primitive"
280280
harness = false
281281

282-
[[bench]]
283-
name = "byte_length_element"
284-
harness = false
285-
286-
[[bench]]
287-
name = "null_strategy_bytes"
288-
harness = false
289-
required-features = ["_test-harness"]
290-
291282
[[bench]]
292283
name = "strict_validity"
293284
harness = false

‎vortex-array/benches/byte_length_element.rs‎

Lines changed: 0 additions & 154 deletions
This file was deleted.

‎vortex-array/benches/null_strategy_bytes.rs‎

Lines changed: 0 additions & 151 deletions
This file was deleted.

0 commit comments

Comments
 (0)