txwyy123 commented on PR #26149: URL: https://github.com/apache/datafusion/pull/26149#issuecomment-6161914191
## Benchmark A/B: `main` vs PR (3 iterations, same machine) All numbers are median of 3 back-to-back runs on the same host. | Case | main (ns) | PR (ns) | Δ | Δ% | |------|-----------|---------|---|-----| | `column_count/1` | 16.6 | 17.4 | +0.8 | **+5%** | | `column_count/4` | 57.5 | 52.8 | −4.7 | **−8%** ✅ | | `column_count/16` | 265 | 223 | −42 | **−16%** ✅ | | `column_count/64` | 2,097 | 2,241 | +144 | **+7%** | | `row_count/1` | 57.6 | 52.6 | −5.0 | **−9%** ✅ | | `row_count/128` | 57.5 | 52.3 | −5.2 | **−9%** ✅ | | `row_count/8192` | 57.5 | 52.5 | −5.0 | **−9%** ✅ | | `row_count/65536` | 57.6 | 52.5 | −5.1 | **−9%** ✅ | | `array_layout/primitive` | 57.5 | 53.1 | −4.4 | **−8%** ✅ | | `array_layout/list` | 129 | 123 | −6 | **−5%** ✅ | | `array_layout/struct` | 171 | 165 | −6 | **−4%** ✅ | | `shared_slices/4` | 1,813 | 1,724 | −89 | **−5%** ✅ | | `shared_slices/16` | 8,710 | 7,525 | −1,185 | **−14%** ✅ | | `shared_slices/64` | 34,718 | 33,938 | −780 | **−2%** ✅ | **12 of 14 cases improved or neutral.** The `shared_slices` path (the one operators will actually use with sliced batches) is **2–14% faster** than main. The two minor regressions are on trivial/rare cases: - `column_count/1` (+0.8ns): structural cost of `NonZero` wrapping + refcount init on a single buffer - `column_count/64` (+144ns): overflow `HashMap` path maintains counts alongside IDs; fires only with >16 unique buffers (rare) Applied both suggestions from the previous review: `#[inline(always)]` on `apply_buffer_op`/`increment`, and `.position()` iterator scan replacing the manual loop. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
