ReusableDict for RunEnd duckdb exporter#8538
Conversation
Merging this PR will improve performance by 10.13%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
168.9 µs | 205.6 µs | -17.86% |
| ❌ | Simulation | encode_varbinview[(10000, 2)] |
1.1 ms | 1.2 ms | -12.99% |
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
27.1 µs | 16.2 µs | +67.38% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(100, 100)] |
258.9 µs | 223.8 µs | +15.71% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
244.4 ns | 215.3 ns | +13.55% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(100, 100)] |
306 µs | 270.8 µs | +13.02% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[1024] |
304.7 ns | 275.6 ns | +10.58% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myrrc/run-end-reusable-dict-exporter (1f9bcaa) with develop (5a764e6)
Polar Signals Profiling ResultsLatest Run
Previous Runs (6)
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals ProfilingVortex (geomean): 0.991x ➖ How to read Verdict and Engines
datafusion / vortex-file-compressed (0.991x ➖, 0↑ 0↓)
No file size changes detected. |
Benchmarks: FineWeb NVMeVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.013x ➖, 0↑ 1↓)
datafusion / vortex-compact (1.021x ➖, 0↑ 1↓)
datafusion / parquet (1.009x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.005x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.006x ➖, 0↑ 0↓)
duckdb / parquet (1.017x ➖, 0↑ 0↓)
File Size Changes (1 files changed, +0.0% overall, 1↑ 0↓)
Totals:
|
Benchmarks: TPC-H SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.034x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.019x ➖, 0↑ 0↓)
datafusion / parquet (1.024x ➖, 0↑ 0↓)
datafusion / arrow (1.048x ➖, 0↑ 3↓)
duckdb / vortex-file-compressed (0.993x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.937x ➖, 3↑ 0↓)
duckdb / parquet (1.024x ➖, 0↑ 3↓)
duckdb / duckdb (0.971x ➖, 0↑ 0↓)
File Size Changes (10 files changed, +0.3% overall, 9↑ 1↓)
Totals:
|
Benchmarks: TPC-DS SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.921x ➖, 29↑ 0↓)
datafusion / vortex-compact (0.943x ➖, 17↑ 2↓)
datafusion / parquet (0.924x ➖, 24↑ 0↓)
duckdb / vortex-file-compressed (0.927x ➖, 29↑ 0↓)
duckdb / vortex-compact (0.932x ➖, 18↑ 0↓)
duckdb / parquet (0.956x ➖, 3↑ 0↓)
duckdb / duckdb (0.973x ➖, 7↑ 1↓)
File Size Changes (6 files changed, -0.0% overall, 1↑ 5↓)
Totals:
|
Benchmarks: FineWeb S3Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.837x ➖, 1↑ 0↓)
datafusion / vortex-compact (0.987x ➖, 1↑ 1↓)
datafusion / parquet (1.078x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.120x ➖, 0↑ 1↓)
duckdb / vortex-compact (1.189x ➖, 0↑ 1↓)
duckdb / parquet (1.050x ➖, 0↑ 0↓)
|
Benchmarks: Statistical and Population GeneticsVerdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed (1.008x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.997x ➖, 0↑ 0↓)
duckdb / parquet (0.996x ➖, 0↑ 0↓)
File Size Changes (1 files changed, +0.0% overall, 1↑ 0↓)
Totals:
|
Benchmarks: TPC-H SF=10 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.000x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.999x ➖, 0↑ 0↓)
datafusion / parquet (0.994x ➖, 0↑ 0↓)
datafusion / arrow (0.996x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.004x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.998x ➖, 0↑ 0↓)
duckdb / parquet (0.996x ➖, 0↑ 0↓)
duckdb / duckdb (1.000x ➖, 0↑ 0↓)
File Size Changes (27 files changed, +0.0% overall, 16↑ 11↓)
Totals:
|
Benchmarks: TPC-H SF=1 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.189x ➖, 0↑ 4↓)
datafusion / vortex-compact (1.143x ➖, 0↑ 6↓)
datafusion / parquet (0.888x ➖, 6↑ 3↓)
duckdb / vortex-file-compressed (1.071x ➖, 0↑ 1↓)
duckdb / vortex-compact (1.008x ➖, 0↑ 0↓)
duckdb / parquet (1.111x ➖, 0↑ 1↓)
|
Benchmarks: Clickbench on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.117x ❌, 0↑ 19↓)
datafusion / parquet (1.095x ➖, 0↑ 21↓)
duckdb / vortex-file-compressed (1.007x ➖, 2↑ 8↓)
duckdb / parquet (1.045x ➖, 0↑ 7↓)
duckdb / duckdb (0.969x ➖, 0↑ 0↓)
File Size Changes (102 files changed, +0.0% overall, 53↑ 49↓)
Totals:
|
Benchmarks: Appian on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.993x ➖, 0↑ 0↓)
datafusion / parquet (1.011x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (0.997x ➖, 0↑ 0↓)
duckdb / parquet (0.992x ➖, 0↑ 0↓)
duckdb / duckdb (0.990x ➖, 0↑ 0↓)
File Size Changes (3 files changed, -0.0% overall, 1↑ 2↓)
Totals:
|
Benchmarks: Random AccessVortex (geomean): 1.009x ➖ How to read Verdict and Engines
unknown / unknown (0.994x ➖, 2↑ 2↓)
|
Benchmarks: TPC-H SF=10 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.307x ❌, 0↑ 11↓)
datafusion / vortex-compact (1.250x ➖, 0↑ 6↓)
datafusion / parquet (1.087x ➖, 2↑ 6↓)
duckdb / vortex-file-compressed (1.125x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.000x ➖, 0↑ 0↓)
duckdb / parquet (1.081x ➖, 0↑ 0↓)
|
Benchmarks: CompressionVortex (geomean): 1.011x ➖ How to read Verdict and Engines
unknown / unknown (1.043x ➖, 1↑ 29↓)
|
|
Looks like there's some use-after-free happening. |
d5f6db4 to
787625b
Compare
|
We have two options here:
The best choice is likely the one that's most performant. |
Benchmarks: FineWeb NVMe (base)Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.028x ➖, 1↑ 1↓)
datafusion / parquet (1.000x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (1.167x ❌, 0↑ 6↓)
duckdb / parquet (1.032x ➖, 0↑ 1↓)
File Size Changes (3 files changed, -46.4% overall, 0↑ 3↓)
Totals:
|
Benchmarks: PolarSignals Profiling (base)Vortex (geomean): 1.165x ❌ How to read Verdict and Engines
datafusion / vortex-file-compressed (1.165x ❌, 0↑ 5↓)
No file size changes detected. |
Benchmarks: TPC-H SF=1 on S3 (base)Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.373x ❌, 0↑ 14↓)
datafusion / parquet (1.114x ➖, 0↑ 5↓)
duckdb / vortex-file-compressed (1.104x ➖, 0↑ 3↓)
duckdb / parquet (1.127x ➖, 0↑ 1↓)
|
f64e4a9 to
6b621e6
Compare
6b621e6 to
40004d4
Compare
|
There is a fineweb q1 2x regression with flattening constant/sequence, not sure whether it's a real regression |
|
@claude review in depth |
|
Claude finished @0ax1's task in 4m 9s —— View job In-depth review — ReusableDict for RunEnd duckdb exporterI read the full diff and the surrounding machinery ( ✅ What's correct
|
|
I'll recheck the performance and merge if it doesn't reproduce |
Signed-off-by: Mikhail Kot <[email protected]>
40004d4 to
1f9bcaa
Compare
|
Turns out this was a flaky run, merging |
Move shared logic of creating a ReusableDict or using a created one from dict.rs to a shared file. Use this logic for RunEnd duckdb exporter as well.
Make Constant and Sequence exportes obey flatten=true flag, otherwise ReusableDict values exporting failed for them, reading garbage data.