Skip to content

Add list_transform - #10454

Draft
mhk197 wants to merge 2 commits into
mk/lambda-expressionsfrom
mk/list-transform-fn
Draft

mhk197 wants to merge 2 commits into
mk/lambda-expressionsfrom
mk/list-transform-fn

Conversation

@mhk197

@mhk197 mhk197 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

list_transform(list, (x[, i]) -> body) applies a lambda to every element of a List, ListView or FixedSizeList, keeping each list's length and validity. i is the element's zero-based u64 index within its list.

  • ListTransform is the first higher-order function. Its lambda_params gives the element and, optionally, its index, and its options hold the bound lambda.
  • Execution flattens the lists, repeats each capture for every element of its row with a lazy take over a PiecewiseSequence of parent rows, and evaluates the lambda over the elements. A body that can fail skips elements hidden under null lists.
  • List stays List, FixedSizeList keeps its width, and ListView is rebuilt so it is zero-copyable to List.
  • The validity is the list's validity, and the function is infallible when its lambda is, so it pushes into dictionary values.
vortex.list.transform($.l, (x) -> ($x + $.a))                    unbound
vortex.list.transform($.l, $.a, opts=(x) -> ($x + $capture0))    bound

Testing

  • cargo clippy -p vortex-array --all-targets --all-features -- -D warnings
  • cargo nextest run -p vortex-array
  • cargo test --doc -p vortex-array
  • cargo +nightly-2026-09-10 fmt -p vortex-array

@mhk197
mhk197 added this pull request to stack #10455 October 12, 2026 16:35
@codspeed

codspeed Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 3.27%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ 1 benchmark measured no execution time

Nothing ran under measurement, usually because the compiler removed the code under test. This result is not comparable, so it counts as unchanged.

Preventing compiler optimizations

⚠️ 13 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 5 improved benchmarks
❌ 7 regressed benchmarks
✅ 2201 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ WallTime threshold_neon[80] 5.1 µs 8.2 µs -38.31%
❌ WallTime threshold_neon[64] 4.5 µs 6.1 µs -26.19%
❌ WallTime threshold_neon[8] 3.8 µs 4.4 µs -14.77%
❌ Simulation sum_v2_i64 194.6 µs 224.8 µs -13.44%
❌ Simulation sum_i64 194.8 µs 224.7 µs -13.31%
❌ WallTime starts_with_avx512[8, VarBin] 40.8 µs 46.2 µs -11.75%
❌ WallTime filter_neon[64] 3.1 µs 3.5 µs -10.57%
⚡ ⚠️ Simulation decode_primitives[i64, (1000, 32)] 38.6 µs 24 µs +60.63%
⚡ WallTime threshold_avx2[8] 2.4 µs 1.9 µs +23%
⚡ ⚠️ Simulation random_i128[0.01] 7.3 µs 6.2 µs +17.58%
⚡ WallTime threshold_avx2[64] 3.4 µs 3 µs +12.83%
⚡ WallTime threshold_avx2[80] 3.7 µs 3.3 µs +11.31%

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-fn (1d13ace) with mk/lambda-expressions (78ce193)1

Open in CodSpeed

Footnotes

  1. No successful run was found on mk/lambda-expressions (676b887) during the generation of this report, so ebfa480 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@mhk197
mhk197 force-pushed the mk/list-transform-fn branch from ed39ac3 to c96744d Compare October 12, 2026 19:28
@mhk197
mhk197 force-pushed the mk/list-transform-fn branch from c96744d to 1320f65 Compare October 12, 2026 19:57
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
Signed-off-by: Matt Katz <mhkatz97@gmail.com>
@mhk197
mhk197 force-pushed the mk/list-transform-fn branch from 1320f65 to 1d13ace Compare October 12, 2026 20:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant