Repository navigation
compress-bench: write and scan Parquet the way DataFusion does by default - #10571
robert3005 wants to merge 2 commits into
Conversation
joseph-isaacs
left a comment
There was a problem hiding this comment.
how much extra time and code to use datafusion?
Merging this PR will improve performance by 12.08%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ ℹ️ | Simulation | test_scan_scalar_at[int_float] |
1,085.3 µs | 968.3 µs | +12.08% |
| 🆕 | Simulation | prepare_and_compile[1] |
N/A | 53.7 µs | N/A |
| 🆕 | Simulation | prepare_and_compile[100] |
N/A | 338.3 µs | N/A |
| 🆕 | Simulation | prepare_and_compile[1000] |
N/A | 2.8 ms | N/A |
| 🆕 | Simulation | prepare[1] |
N/A | 16.2 µs | N/A |
| 🆕 | Simulation | prepare[100] |
N/A | 74.6 µs | N/A |
| 🆕 | Simulation | prepare[1000] |
N/A | 424.2 µs | N/A |
| 🆕 | Simulation | scan[1] |
N/A | 96.9 µs | N/A |
| 🆕 | Simulation | scan[100] |
N/A | 1.3 ms | N/A |
| 🆕 | Simulation | scan[1000] |
N/A | 12.4 ms | N/A |
Tip
Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/loving-mayer-wp6vev (76637fc) with develop (bc9e0e6)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
develop(d3bac42) during the generation of this report, so bc9e0e6 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
Polar Signals Profiling ResultsLatest Run
Powered by Polar Signals Cloud |
Benchmarks: Compression 📖Commits: PR vortex / vortex-file-compressed / ns (0.994x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / bytes (1.000x ➖, 0↑ 0↓)
vortex / vortex-file-compressed / ratio (0.703x ✅, 15↑ 0↓)
vortex / parquet / ns (1.686x ❌, 0↑ 15↓)
vortex / parquet / bytes (1.000x ➖, 0↑ 0↓)
vortex / arrow-ipc / ns (0.991x ➖, 0↑ 0↓)
vortex / arrow-ipc / bytes (1.000x ➖, 0↑ 0↓)
|
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
|
@joseph-isaacs I prototyped calling DataFusion directly to measure it. On write, a Code: about 50 lines for the direct calls, against about 240 non-comment lines for the port in this PR. Dependencies: compress-bench picks up 49 more crates (the DataFusion stack plus Runtime: synthetic 4-column data (i64, i32, f64, short strings), zstd(1), release build, median of 7, on a 4-core box:
Trade-off: calling DataFusion directly is less code and is literally what DataFusion does, which is easier to defend to outside readers. The cost is the extra dependencies and the fixed overhead on tiny datasets. The port keeps compress-bench light and isolates the format cost, but someone has to check that it stays faithful to DataFusion. Happy to switch the PR to the direct calls if you'd rather. Generated by Claude Code |
…ault Replace the bespoke Parquet parallelism from #10510 with a port of DataFusion's defaults: - Compress follows ParquetSink: one encoding task per leaf column of the open row group, fed through channels of 2 arrays, with the next row group starting while the previous one is closed and at most 1 finished row group queued for appending. Output leaves the writer buffer every ~1 MB and is joined once at the end. - Decompress follows DataFusion's file scan: the file is split into one byte range per runtime worker (one partition under 1 MiB), each row group goes to the range holding its first page, and each range is one sequential reader in 8,192-row batches with view types. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HGj5uR9atXRsZGJBZwNidZ Signed-off-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HGj5uR9atXRsZGJBZwNidZ Signed-off-by: Claude <noreply@anthropic.com>
76637fc to
ec8ac8b
Compare
Replace the bespoke Parquet parallelism from #10510 with a port of DataFusion's defaults: