refactor: propagate bound expressions through layouts - #9126
Conversation
Merging this PR will degrade performance by 8.47%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | chunked_canonicalize_into[(1000, 50, 8, 4)] |
14.6 ms | 17.5 ms | -16.97% |
| ❌ | Simulation | chunked_canonicalize_into[(1000, 50, 8, 64)] |
17.1 ms | 20.3 ms | -16% |
| ❌ | Simulation | chunked_canonicalize_into[(1000, 50, 8, 16)] |
15.7 ms | 18.6 ms | -15.9% |
| ❌ | Simulation | chunked_canonicalize_into[(1000, 100, 16, 4)] |
20.8 ms | 24.2 ms | -13.78% |
| ❌ | Simulation | chunked_into_canonical[(1000, 50, 8, 4)] |
17.4 ms | 19.7 ms | -11.8% |
| ❌ | Simulation | chunked_canonicalize_into[(1000, 100, 16, 16)] |
24.6 ms | 27.9 ms | -11.75% |
| ❌ | Simulation | chunked_into_canonical[(1000, 50, 8, 16)] |
18.5 ms | 20.9 ms | -11.65% |
| ❌ | Simulation | chunked_into_canonical[(1000, 50, 8, 64)] |
20.1 ms | 22.7 ms | -11.41% |
| ⚡ | WallTime | cuda/bitpacked_u8/unpack/3bw[100M] |
354.3 µs | 300.5 µs | +17.9% |
| ⚡ | Simulation | chunked_varbinview_opt_into_canonical[(10, 1000)] |
6.2 ms | 5.5 ms | +13.57% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ji/bound-expr-stack (c98bf5e) with develop (465fab3)
Footnotes
-
1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩
1da1017 to
772e7da
Compare
772e7da to
b771484
Compare
Polar Signals Profiling ResultsLatest Run
Previous Runs (48)
Powered by Polar Signals Cloud |
Benchmarks: String Encoding 📖vortex / vortex-file-compressed / ms (0.998x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / % (1.000x ➖, 0↑ 0↓)
|
Benchmarks: PolarSignals Profiling 📖Vortex (geomean): 0.994x ➖ datafusion / vortex-file-compressed / ns (0.994x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.960x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (0.957x ➖, 1↑ 0↓)
datafusion / parquet / ns (1.005x ➖, 1↑ 1↓)
duckdb / vortex-file-compressed / ns (1.001x ➖, 1↑ 0↓)
duckdb / vortex-compact / ns (1.005x ➖, 0↑ 1↓)
duckdb / parquet / ns (0.995x ➖, 1↑ 0↓)
duckdb / duckdb / ns (0.990x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: FineWeb NVMe 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.941x ➖, 2↑ 0↓)
datafusion / vortex-compact / ns (0.966x ➖, 1↑ 0↓)
datafusion / parquet / ns (0.991x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.150x ❌, 0↑ 6↓)
duckdb / vortex-compact / ns (0.985x ➖, 1↑ 1↓)
duckdb / parquet / ns (1.003x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: TPC-DS SF=1 on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.975x ➖, 1↑ 0↓)
datafusion / vortex-compact / ns (0.982x ➖, 3↑ 1↓)
datafusion / parquet / ns (0.988x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed / ns (1.025x ➖, 1↑ 11↓)
duckdb / vortex-compact / ns (1.011x ➖, 1↑ 3↓)
duckdb / parquet / ns (0.999x ➖, 3↑ 5↓)
duckdb / duckdb / ns (1.000x ➖, 2↑ 2↓)
No file size changes detected. |
Benchmarks: Statistical and Population Genetics 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed / ns (1.029x ➖, 3↑ 3↓)
duckdb / vortex-compact / ns (1.062x ➖, 1↑ 4↓)
duckdb / parquet / ns (0.991x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Clickbench Sorted on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.921x ➖, 2↑ 2↓)
datafusion / parquet / ns (1.005x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.963x ➖, 3↑ 1↓)
duckdb / parquet / ns (0.971x ➖, 1↑ 0↓)
duckdb / duckdb / ns (0.990x ➖, 0↑ 0↓)
File Size Changes (201 files changed, -0.0% overall, 95↑ 106↓)
Totals:
|
Benchmarks: FineWeb S3 📖Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.993x ➖, 0↑ 1↓)
datafusion / vortex-compact / ns (0.841x ➖, 1↑ 0↓)
datafusion / parquet / ns (0.888x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed / ns (0.993x ➖, 0↑ 0↓)
duckdb / vortex-compact / ns (1.013x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.997x ➖, 0↑ 0↓)
|
Benchmarks: Appian on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.003x ➖, 0↑ 0↓)
datafusion / parquet / ns (1.007x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.010x ➖, 0↑ 0↓)
duckdb / parquet / ns (1.005x ➖, 0↑ 0↓)
duckdb / duckdb / ns (1.007x ➖, 0↑ 0↓)
File Size Changes (1 files changed, -0.0% overall, 0↑ 1↓)
Totals:
|
Benchmarks: TPC-H SF=1 on S3 📖Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.941x ➖, 2↑ 1↓)
datafusion / vortex-compact / ns (1.022x ➖, 0↑ 0↓)
datafusion / parquet / ns (1.023x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (0.978x ➖, 1↑ 0↓)
duckdb / vortex-compact / ns (0.999x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.959x ➖, 0↑ 0↓)
|
Benchmarks: TPC-H SF=10 on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.987x ➖, 0↑ 0↓)
datafusion / vortex-compact / ns (0.975x ➖, 1↑ 0↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.027x ➖, 0↑ 1↓)
duckdb / vortex-compact / ns (1.005x ➖, 0↑ 1↓)
duckdb / parquet / ns (0.981x ➖, 1↑ 0↓)
duckdb / duckdb / ns (1.012x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Clickbench on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.984x ➖, 3↑ 2↓)
datafusion / parquet / ns (0.998x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.004x ➖, 5↑ 9↓)
duckdb / parquet / ns (1.006x ➖, 1↑ 2↓)
duckdb / duckdb / ns (1.009x ➖, 0↑ 0↓)
File Size Changes (1 files changed, -0.0% overall, 0↑ 1↓)
Totals:
|
Benchmarks: Random Access 📖Vortex (geomean): 0.977x ➖ vortex / vortex-file-compressed / ns (0.977x ➖, 0↑ 0↓)
vortex / parquet / ns (1.001x ➖, 0↑ 0↓)
vortex / lance / ns (1.004x ➖, 0↑ 0↓)
|
Benchmarks: TPC-H SF=10 on S3 📖Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.910x ➖, 3↑ 0↓)
datafusion / vortex-compact / ns (0.937x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.934x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed / ns (1.077x ➖, 0↑ 2↓)
duckdb / vortex-compact / ns (1.035x ➖, 0↑ 1↓)
duckdb / parquet / ns (0.968x ➖, 0↑ 0↓)
|
Benchmarks: Vortex queries 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.007x ➖, 0↑ 0↓)
datafusion / parquet / ns (1.002x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.038x ➖, 0↑ 0↓)
duckdb / parquet / ns (0.999x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: Compression 📖vortex / vortex-file-compressed / ns (1.000x ➖, 0↑ 1↓)
vortex / vortex-file-compressed / bytes (0.999x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / ratio (1.005x ➖, 0↑ 1↓)
vortex / parquet / ns (0.991x ➖, 0↑ 0↓)
vortex / parquet / bytes (1.000x ➖, 0↑ 0↓)
|
b771484 to
3e2d8b4
Compare
3e2d8b4 to
e1dbe37
Compare
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
e1dbe37 to
c85008e
Compare
GPU Compression |
robert3005
left a comment
There was a problem hiding this comment.
Mechanically this is a clean, wide-but-shallow migration of LayoutReader::{pruning,filter,projection}_evaluation to BoundExpression. Tests and clippy pass locally. My findings are all in the places where the migration changed cache key semantics or quietly dropped a step; see the inline comments.
The headline one is the FileStatsLayoutReader prune cache, which I confirmed empirically now has a 0% hit rate and grows unboundedly.
A cross-cutting point behind several of the comments: after this PR the layout readers use two different cache key strategies on the same code path — ExactBoundExpr (Arc::ptr_eq identity) in StructReader, RowIdxLayoutReader and FileStatsLayoutReader, versus plain BoundExpression (structural) in DictReader and zoned::PruningState. The identity-keyed ones degrade silently to "never hits" when any caller rebinds, rather than failing. Please document on the LayoutReader trait that callers must pass a stably-bound expression, and consider binding once per reader and threading the bound expression through ScanRequest instead of rebinding at each entry point (scan/layout.rs:143, scan/multi.rs:449).
Checks run:
cargo nextest run -p vortex-layout -p vortex-array # 3310 passed, 1 skipped
cargo nextest run -p vortex-file -p vortex-scan # 155 passed
cargo clippy -p vortex-layout -p vortex-array -p vortex-file --all-targets # clean
Not run: vortex-cuda (no local CUDA), vortex-duckdb/vortex-datafusion, vortex-tui, docs, Python bindings, full workspace. The CodSpeed regressions flagged on this PR (runend decompress, patches_lookup) don't touch any changed code and look like Walltime-on-hosted-runner noise, as CodSpeed's own warning suggests.
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
This is part of the migration to use
BoundExpressionthought vortex internals. #9120Summary
LayoutReaderevaluationBreak
LayoutReader api not take a
BoundExpressionit should be easy to make one withExpression::bind