model-writtenrun 8248 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Jeff Davis proposed replacing HyperLogLog's bit-scanning loop with pg_leftmost_one_pos32() after noticing estimation overhead in spilled HashAgg workloads, and requested backpatching to PostgreSQL 13 in #1.
- Peter Geoghegan explained that HyperLogLog predated the bit utility, requested benchmark details and preservation of upstream variable names, and supported backpatching if the performance benefit was measurable in #2.
- Jeff reported a tight-loop improvement from 15.6 seconds to 6.6 seconds and a reduced HashAgg penalty, confirmed the naming adjustment, and announced that the patch had been committed as fd734f387d and backpatched in #3.
- Tomas Vondra asked whether the whole-query benchmark represented a realistic workload and requested its setup in #4.
- Jeff supplied the configuration, data generation and DISTINCT query in #5, clarifying that the greater-than-twofold speedup applied to the tight loop while the whole-query improvement was a couple of percent; the change was already committed and backpatched.