public inbox for [email protected]  
help / color / mirror / Atom feed
From: Dean Rasheed <[email protected]>
To: Joel Jacobson <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: Simplifying width_bucket_numeric()
Date: Wed, 10 Jul 2024 20:31:02 +0100
Message-ID: <CAEZATCWJ83U2ebcEW5KiD83YL_aLE+n3JHUO+gyY_hYEEiq91g@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAEZATCVbJH+LE9EXW8Rk3AxLe=jbOk2yrT_AUJGGh5Rah6zoeg@mail.gmail.com>
	<[email protected]>

On Sun, 7 Jul 2024 at 13:43, Joel Jacobson <[email protected]> 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






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Simplifying width_bucket_numeric()
  In-Reply-To: <CAEZATCWJ83U2ebcEW5KiD83YL_aLE+n3JHUO+gyY_hYEEiq91g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox