ulagsd commented on issue #6976: URL: https://github.com/apache/datafusion-comet/issues/6976#issuecomment-6792427194
take Plan: - Hoist the Int8–Int64 dispatch into one helper. - One generic sum loop parameterized by the add (wrapping / checked→error / checked→None). - Make the groups accumulator generic over the mode, keeping Try's `has_all_nulls` separate. Following the benchmarks in #5098, I'll keep per-width loops (no widening to an `Int64Array`). Baseline on `main` (e59d9373, Apple M5), `cargo bench --bench aggregate -- sum_integer`: | | Legacy | ANSI | Try | |---|---|---|---| | end-to-end Int64 | 411 µs | 446 µs | 485 µs | | row accumulator | 5.4 µs | 22.0 µs | 20.9 µs | | groups accumulator | 43.1 µs | 48.5 µs | 80.5 µs | The existing benches only cover Int64, while the #5098 regressions were on narrow types, so I'd also add Int8/Int16/Int32 cases to `benches/aggregate.rs` as a first commit and report before/after for every width. -- 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]
