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


Reply via email to