| From: | David Geier <geidav(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Andrei Lepikhov <lepihov(at)gmail(dot)com>, Josh Hurst <joshhurst77(at)gmail(dot)com>, chenhuimo(dot)mch(at)qq(dot)com |
| Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org, "andreas(at)proxel(dot)se" <andreas(at)proxel(dot)se> |
| Subject: | Re: Use local buffer for packed numerics |
| Date: | 2026-12-03 12:20:18 |
| Message-ID: | 79f47bb0-9e3e-4801-a43e-5ed2f4074d14@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
>> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Geier | 2026-12-03 12:24:00 | Re: Optimize MCV stats for sortable types and utilize sorted-order properties |
| Previous Message | Nitin Motiani | 2026-12-03 12:17:32 | Re: [PATCH v1] Fix for bug #19773 : pg_dump differing generation expressions of inherited columns |