Re: Simplifying width_bucket_numeric() - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Simplifying width_bucket_numeric()
Date
Msg-id CAEZATCWJ83U2ebcEW5KiD83YL_aLE+n3JHUO+gyY_hYEEiq91g@mail.gmail.com
Whole thread Raw
In response to Re: Simplifying width_bucket_numeric()  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers
On Sun, 7 Jul 2024 at 13:43, Joel Jacobson <joel@compiler.org> wrote:
>
> > SELECT hash_array(array_agg(width_bucket(op, b1, b2, c))) FROM t;
> > -- Result not changed by patch
>
> Same hash_array on all my three machines:
>
> > SELECT sum(width_bucket(op, b1, b2, c)) FROM t;
> > Time: 3658.962 ms (00:03.659)  -- HEAD
> > Time: 3089.946 ms (00:03.090)  -- with patch
>
> Significant improvement on all my three machines:
>

Thanks for testing. I have committed this now.

(I also realised that the "reversed_bounds" code was unnecessary,
since the only effect was to negate both inputs to div_var(), so the
signs cancel out.)

Regards,
Dean



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: pg_maintain and USAGE privilege on schema
Next
From: Nathan Bossart
Date:
Subject: Re: pg_maintain and USAGE privilege on schema