From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <rhaas(at)postgresql(dot)org> |
Subject: | Re: HyperLogLog.c and pg_leftmost_one_pos32() |
Date: | 2020-07-30 17:16:19 |
Message-ID: | 20200730171619.3mtqgqg2z6lhmljo@development |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 30, 2020 at 09:21:23AM -0700, Jeff Davis wrote:
>On Wed, 2020-07-29 at 17:32 -0700, Peter Geoghegan wrote:
>> How did you test this? What kind of difference are we talking about?
>
>Essentially:
> initHyperLogLog(&hll, 5)
> for i in 0 .. one billion
> addHyperLogLog(&hll, hash(i))
> estimateHyperLogLog
>
>The numbers are the same regardless of bwidth.
>
>Before my patch, it takes about 15.6s. After my patch, it takes about
>6.6s, so it's more than a 2X speedup (including the hash calculation).
>
Wow. That's a huge improvements.
How does the whole test (data + query) look like? Is it particularly
rare / special case, or something reasonable to expect in practice?
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2020-07-30 17:32:48 | Re: PG 13 release notes, first draft |
Previous Message | Jeff Davis | 2020-07-30 16:21:23 | Re: HyperLogLog.c and pg_leftmost_one_pos32() |