alamb opened a new pull request, #24687: URL: https://github.com/apache/datafusion/pull/24687
## Which issue does this PR close? - Part of https://github.com/apache/datafusion/pull/24102 - Follow on to https://github.com/apache/datafusion/pull/24102#discussion_r3851941679 Note: this PR is based on https://github.com/apache/datafusion/pull/24102 and includes its commits; it will be rebased against `main` once that PR merges. See the last commit for the actual change. ## Rationale for this change In https://github.com/apache/datafusion/pull/24102#discussion_r3851941679 I wondered if the generic `FixedSizeBinaryFilter<T>` is worth the extra generated code: it is monomorphized for 5 widths, and each instantiation basically just does type dispatch. This PR tests the alternative: a single non-generic `FixedSizeBinaryFilter` that dispatches on the value width at runtime (once per batch). The purpose is to measure: 1. How much runtime overhead the per-batch dynamic dispatch adds (via the `in_list_strategy` benchmarks) 2. How much generated code / binary size the monomorphization costs Benchmark and code size results to follow in comments. ## What changes are included in this PR? - Remove the `T: ArrowPrimitiveType` parameter from `FixedSizeBinaryFilter`, replacing the 5 monomorphized filter instantiations with a single runtime `match` on `value_size()` in a new `reinterpret` helper, called once per probed batch. ## Are these changes tested? Yes, by the existing tests in `fixed_size_binary_filter.rs` (all supported widths, strategy thresholds, dictionaries, slices, unaligned buffers, unsupported widths). ## Are there any user-facing changes? No -- 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]
