>> Beyond that we should settle on a common benchmark. If the benchmark is >> not specific enough for some of the optimizations, we can extend it or >> at least use it for showing there are no regressions. I attached the >> latest version of my NUMERIC benchmark. I extended it to also cover >> special NUMERICs and more functionality (hashing, in/out, ...). > I'd prefer to work and benchmark each piece separately. It is clear to me that > they address quite different use cases. For example, aggregate improvement > compacts the “fast path” transition state from 256 bytes to 64 and improves > execution time mostly by reducing memory consumption. EQ/NEQ feature is all > about CPU cycles.
I agree that each optimization should be developed and evaluated separately, using targeted benchmarks that demonstrate its benefits. But that is complementary to running a common benchmark, not an alternative. A targeted benchmark tells us whether an optimization helps its intended workload. It does not tell us what it costs elsewhere. Changes to shared arithmetic routines, for example, can affect aggregates and other numeric functions that call them indirectly. Even adding a fast-path check can slow down inputs that fall back to the existing implementation. A common benchmark gives us a reproducible baseline for identifying those trade-offs, including effects on wider inputs, special values, and other operations. We should run each patch separately against both its targeted benchmarks and that baseline, extending the latter where coverage is missing. This does not mean combining the patches or requiring every patch to improve every query; it means making regressions visible so we can evaluate them explicitly. > Also, each feature has its own regressions. By pointing the benchmark to these > regressions, we would better understand their value. Agreed. But it's good to know about them so we can discuss the tradeoffs. -- David Geier
