Don't recalculate chunk offsets for ChunkedReader#8231
Conversation
Polar Signals Profiling ResultsLatest Run
Previous Runs (2)
Powered by Polar Signals Cloud |
Benchmarks: PolarSignals ProfilingVortex (geomean): 0.978x ➖ How to read Verdict and Engines
datafusion / vortex-file-compressed (0.978x ➖, 1↑ 0↓)
No file size changes detected. |
Merging this PR will improve performance by 30.15%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
45.4 µs | 30.4 µs | +49.27% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
197.7 µs | 161.4 µs | +22.44% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
212.3 µs | 176 µs | +20.64% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing myrrc/chunked-layout-offsets (6c1444c) with develop (2d00342)
Benchmarks: FineWeb NVMeVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.939x ➖, 4↑ 0↓)
datafusion / vortex-compact (0.939x ➖, 1↑ 0↓)
datafusion / parquet (1.066x ➖, 0↑ 3↓)
duckdb / vortex-file-compressed (0.917x ➖, 4↑ 0↓)
duckdb / vortex-compact (0.919x ➖, 3↑ 0↓)
duckdb / parquet (0.957x ➖, 2↑ 0↓)
File Size Changes (1 files changed, -0.0% overall, 0↑ 1↓)
Totals:
Full attributed analysis
|
Benchmarks: TPC-H SF=1 on NVMEVerdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.961x ➖, 0↑ 0↓)
datafusion / vortex-compact (1.046x ➖, 0↑ 4↓)
datafusion / parquet (1.053x ➖, 1↑ 6↓)
datafusion / arrow (1.142x ❌, 3↑ 11↓)
duckdb / vortex-file-compressed (1.033x ➖, 0↑ 3↓)
duckdb / vortex-compact (0.982x ➖, 0↑ 0↓)
duckdb / parquet (0.978x ➖, 3↑ 1↓)
duckdb / duckdb (1.021x ➖, 0↑ 1↓)
File Size Changes (10 files changed, +0.1% overall, 3↑ 7↓)
Totals:
Full attributed analysis
|
Benchmarks: TPC-DS SF=1 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.941x ➖, 20↑ 0↓)
datafusion / vortex-compact (0.972x ➖, 5↑ 0↓)
datafusion / parquet (0.951x ➖, 24↑ 0↓)
duckdb / vortex-file-compressed (0.967x ➖, 5↑ 1↓)
duckdb / vortex-compact (0.967x ➖, 5↑ 0↓)
duckdb / parquet (0.994x ➖, 0↑ 3↓)
duckdb / duckdb (0.992x ➖, 3↑ 1↓)
File Size Changes (6 files changed, +0.0% overall, 6↑ 0↓)
Totals:
Full attributed analysis
|
Benchmarks: FineWeb S3Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.169x ➖, 0↑ 2↓)
datafusion / vortex-compact (1.347x ❌, 0↑ 3↓)
datafusion / parquet (1.193x ➖, 0↑ 1↓)
duckdb / vortex-file-compressed (1.172x ➖, 0↑ 2↓)
duckdb / vortex-compact (0.983x ➖, 0↑ 0↓)
duckdb / parquet (1.096x ➖, 0↑ 0↓)
Full attributed analysis
|
Benchmarks: Statistical and Population GeneticsVerdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed (1.005x ➖, 0↑ 0↓)
duckdb / vortex-compact (0.999x ➖, 0↑ 0↓)
duckdb / parquet (0.981x ➖, 0↑ 0↓)
File Size Changes (1 files changed, -0.0% overall, 0↑ 1↓)
Totals:
Full attributed analysis
|
Benchmarks: Random AccessVortex (geomean): 0.933x ➖ How to read Verdict and Engines
unknown / unknown (0.936x ➖, 11↑ 0↓)
|
Benchmarks: TPC-H SF=10 on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.932x ➖, 8↑ 0↓)
datafusion / vortex-compact (0.950x ➖, 3↑ 0↓)
datafusion / parquet (0.952x ➖, 4↑ 0↓)
datafusion / arrow (0.969x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed (0.960x ➖, 2↑ 0↓)
duckdb / vortex-compact (0.978x ➖, 0↑ 0↓)
duckdb / parquet (0.969x ➖, 1↑ 0↓)
duckdb / duckdb (0.951x ➖, 0↑ 0↓)
File Size Changes (26 files changed, +0.0% overall, 14↑ 12↓)
Totals:
Full attributed analysis
|
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.363x ❌, 0↑ 15↓)
datafusion / vortex-compact (1.366x ❌, 0↑ 12↓)
datafusion / parquet (1.179x ➖, 0↑ 6↓)
duckdb / vortex-file-compressed (1.024x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.005x ➖, 0↑ 0↓)
duckdb / parquet (1.091x ➖, 0↑ 1↓)
Full attributed analysis
|
Benchmarks: Appian on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.001x ➖, 1↑ 0↓)
datafusion / parquet (1.008x ➖, 0↑ 1↓)
duckdb / vortex-file-compressed (1.043x ➖, 0↑ 0↓)
duckdb / parquet (1.036x ➖, 0↑ 0↓)
duckdb / duckdb (1.030x ➖, 0↑ 0↓)
File Size Changes (4 files changed, -0.0% overall, 2↑ 2↓)
Totals:
Full attributed analysis
|
ee43336 to
6c1444c
Compare
Benchmarks: Clickbench on NVMEVerdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (1.101x ❌, 0↑ 19↓)
datafusion / parquet (1.063x ➖, 0↑ 15↓)
duckdb / vortex-file-compressed (1.041x ➖, 0↑ 7↓)
duckdb / parquet (1.001x ➖, 0↑ 1↓)
duckdb / duckdb (0.961x ➖, 8↑ 0↓)
File Size Changes (103 files changed, -0.0% overall, 41↑ 62↓)
Totals:
Full attributed analysis
|
Benchmarks: CompressionVortex (geomean): 1.001x ➖ How to read Verdict and Engines
unknown / unknown (1.008x ➖, 4↑ 7↓)
|
Benchmarks: TPC-H SF=10 on S3Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed (0.985x ➖, 0↑ 0↓)
datafusion / vortex-compact (0.920x ➖, 2↑ 1↓)
datafusion / parquet (1.004x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed (0.996x ➖, 0↑ 0↓)
duckdb / vortex-compact (1.019x ➖, 0↑ 0↓)
duckdb / parquet (0.931x ➖, 0↑ 0↓)
Full attributed analysis
|
| @@ -135,12 +131,11 @@ pub struct ChunkedLayout { | |||
|
|
|||
| impl ChunkedLayout { | |||
| pub fn new(row_count: u64, dtype: DType, children: Arc<dyn LayoutChildren>) -> Self { | |||
| let mut chunk_offsets = Vec::with_capacity(children.nchildren() + 1); | |||
|
|
|||
| chunk_offsets.push(0); | |||
| let mut chunk_offsets = vec![0; children.nchildren() + 1]; | |||
| for i in 0..children.nchildren() { | |||
| chunk_offsets.push(chunk_offsets[i] + children.child_row_count(i)); | |||
| chunk_offsets[i + 1] = chunk_offsets[i] + children.child_row_count(i); | |||
| } | |||
|
|
|||
| assert_eq!( | |||
| chunk_offsets[children.nchildren()], | |||
There was a problem hiding this comment.
revert or use mut iter if you want perf
Reuse them from parent layout.