Skip to content

Commit 8b8e84d

Browse files
dfa1claude
andcommitted
perf: add parquetReadMultiColumn benchmark, update README with full comparison
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 55566e5 commit 8b8e84d

2 files changed

Lines changed: 25 additions & 7 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,12 @@ JMH throughput (ops/s = full-file scans per second). Higher is better.
283283
Source: 47.6 MB Parquet → 12.0 MB Vortex (4× compression). Both sides scalar decode
284284
(Hardwood disables SIMD on JDK 25; Vortex Java uses FFM scalar reads throughout).
285285
286-
| Benchmark | ops/s | vs Parquet |
287-
|---|---|---|
288-
| `parquetRead` — Hardwood, single col (`trip_distance`) | 66.96 ± 1.99 | baseline |
289-
| `vortexRead` — single col (`trip_distance`) | 201.61 ± 1.63 | **3.0×** |
290-
| `vortexReadMultiColumn` — two cols (`fare_amount` + `PULocationID`) | 140.31 ± 5.42 | **2.1×** |
286+
| Benchmark | ops/s | ms/scan | vs Parquet |
287+
|---|---|---|---|
288+
| `parquetRead` — Hardwood, 1 col (`trip_distance`) | 66.96 ± 1.99 | 14.9 ms | baseline |
289+
| `vortexRead` — 1 col (`trip_distance`) | 201.61 ± 1.63 | 4.96 ms | **3.0×** |
290+
| `parquetReadMultiColumn` — 2 cols (`fare_amount`, `PULocationID`) | 53.07 ± 1.25 | 18.8 ms | baseline |
291+
| `vortexReadMultiColumn` — 2 cols (`fare_amount`, `PULocationID`) | 140.31 ± 5.42 | 7.13 ms | **2.6×** |
291292
292293
### Why fewer layers = faster
293294

performance/src/main/java/io/github/dfa1/vortex/performance/ParquetVsVortexReadBenchmark.java

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ public void tearDown() throws IOException {
111111
}
112112
}
113113

114-
/// Hardwood: scan all rows, sum trip_distance.
114+
/// Hardwood: scan all rows, sum trip_distance (single column).
115115
@Benchmark
116116
public double parquetRead() throws IOException {
117117
double sum = 0.0;
118-
ColumnProjection projection = ColumnProjection.columns("trip_distance", "fare_amount", "PULocationID");
118+
ColumnProjection projection = ColumnProjection.columns("trip_distance");
119119
try (ParquetFileReader reader = ParquetFileReader.open(InputFile.of(parquetFile));
120120
RowReader rows = reader.buildRowReader().projection(projection).build()) {
121121
while (rows.hasNext()) {
@@ -126,6 +126,23 @@ public double parquetRead() throws IOException {
126126
return sum;
127127
}
128128

129+
/// Hardwood: scan all rows, sum fare_amount + PULocationID (two columns).
130+
@Benchmark
131+
public double parquetReadMultiColumn() throws IOException {
132+
double fareSum = 0.0;
133+
long idSum = 0L;
134+
ColumnProjection projection = ColumnProjection.columns("fare_amount", "PULocationID");
135+
try (ParquetFileReader reader = ParquetFileReader.open(InputFile.of(parquetFile));
136+
RowReader rows = reader.buildRowReader().projection(projection).build()) {
137+
while (rows.hasNext()) {
138+
rows.next();
139+
fareSum += rows.getDouble("fare_amount");
140+
idSum += rows.getInt("PULocationID");
141+
}
142+
}
143+
return fareSum + idSum;
144+
}
145+
129146
/// Vortex: scan all rows, sum trip_distance via fold.
130147
@Benchmark
131148
public double vortexRead() throws IOException {

0 commit comments

Comments
 (0)