Repository navigation
Add list_transform - #10503
Add list_transform#10503mhk197 wants to merge 1 commit into
list_transform#10503Conversation
Merging this PR will regress 2 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | mul_u64_nonnull_neon |
20.4 µs | 38.8 µs | -47.41% |
| ❌ | WallTime | words_gather_dispatch_neon[65536] |
1.8 µs | 2 µs | -10.24% |
| ⚡ | Simulation | fast_lt_out_of_range[16, 65536] |
262.4 µs | 69.6 µs | ×3.8 |
| ⚡ | Simulation | fast_eq_out_of_range[16, 65536] |
258.8 µs | 75.2 µs | ×3.4 |
| ⚡ | Simulation | fast_eq_out_of_range[4, 65536] |
171.7 µs | 75 µs | ×2.3 |
| ⚡ | Simulation | fast_lt_out_of_range[4, 65536] |
157.4 µs | 70.8 µs | ×2.2 |
| ⚡ | Simulation | new_bp_prim_test_between[i16, 32768] |
217.5 µs | 153.8 µs | +41.49% |
| ⚡ | Simulation | new_bp_prim_test_between[i16, 16384] |
135.8 µs | 103.8 µs | +30.79% |
| ⚡ | Simulation | new_bp_prim_test_between[i32, 32768] |
222.5 µs | 175.3 µs | +26.94% |
| ⚡ | Simulation | new_alp_prim_test_between[f32, 32768] |
225.2 µs | 177.9 µs | +26.56% |
| ⚡ | Simulation | new_bp_prim_test_between[i64, 32768] |
240.5 µs | 195.7 µs | +22.9% |
| ⚡ | Simulation | new_alp_prim_test_between[f64, 32768] |
254.8 µs | 209.9 µs | +21.37% |
| ⚡ ℹ️ | Simulation | test_scan_filter[int] |
3.7 ms | 3 ms | +21.34% |
| ⚡ | Simulation | chunked_opt_bool_canonical_into[(1000, 10)] |
65.4 µs | 54.4 µs | +20.13% |
| ⚡ | Simulation | new_bp_prim_test_between[i32, 16384] |
138.4 µs | 116.2 µs | +19.1% |
| ⚡ | WallTime | threshold_avx2[80] |
3 µs | 2.6 µs | +16.73% |
| ⚡ | Simulation | new_alp_prim_test_between[f32, 16384] |
164.5 µs | 141.9 µs | +15.96% |
| ⚡ | Simulation | new_bp_prim_test_between[i64, 16384] |
149.1 µs | 129.3 µs | +15.32% |
| ⚡ | Simulation | new_alp_prim_test_between[f64, 16384] |
163.1 µs | 143.2 µs | +13.86% |
| ⚡ |
Simulation | random_i128[0.01] |
6 µs | 5.2 µs | +13.8% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing mk/list-transform-v3 (f687da3) with develop (3ded4dd)2
Footnotes
-
12 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. ↩
-
No successful run was found on
mk/lambdas-v3(8204f42) during the generation of this report, sodevelop(3ded4dd) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
b532ee2 to
42ca3cd
Compare
42ca3cd to
fca3b22
Compare
6d06424 to
b9493f8
Compare
1c8172e to
f687da3
Compare
f687da3 to
941e01d
Compare
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
941e01d to
01f5e6c
Compare
Summary
list_transform(list, lambda)applies a one-parameter lambda to every element of aList(in any encoding), keeping each list's length and validity.Stacked on #10502.
Changes
ListTransform's options areListTransformOptions: the lambda as written (Lambda) in an expression, or bound to the element's dtype (BoundLambda) in a bound expression or an array. Its only child is the list.bind_optionsbinds the lambda to the element's dtype when the node is bound, soexecuteonly runs it. AFixedSizeList, or a lambda with more than one parameter, is rejected there.list_from_list_viewlays the lists out back to back with nothing before the first or after the last. Every element then belongs to exactly one valid list, so the lambda never sees a value nobody can read, such as leftovers under a null list, gaps in a list view or the rest of a slice.ListArraywith the same offsets and validity around the new elements.Testing
New tests cover binding the lambda with the node, null lists with and without hidden elements, sliced lists and list views, overlapping list views, nested lambdas three levels deep, re-rooting with
replace, and dictionary inputs, both pushing an infallible transform into the values and skipping an unused value that a fallible body would fail on.cargo +nightly-2026-09-10 fmt -p vortex-arraycargo clippy -p vortex-array --all-targets --all-features -- -D warningscargo nextest run -p vortex-array(the full suite)cargo test --doc -p vortex-array -- lambda list_transform exprs::varFollow-up
FixedSizeListinput, giving aFixedSizeList.