Re: Some improvements to numeric sqrt() and ln() - Mailing list pgsql-hackers

From Dean Rasheed
Subject Re: Some improvements to numeric sqrt() and ln()
Date
Msg-id CAEZATCVOMC6QpFehBM8oQBa8bx+P1ptWjefgN75iXUnc=jkEQw@mail.gmail.com
Whole thread Raw
In response to Some improvements to numeric sqrt() and ln()  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: Some improvements to numeric sqrt() and ln()
List pgsql-hackers
On Fri, 28 Feb 2020 at 08:15, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>
> It's possible that there are further gains to be had in the sqrt()
> algorithm on platforms that support 128-bit integers, but I haven't
> had a chance to investigate that yet.
>

Rebased patch attached, now using 128-bit integers for part of
sqrt_var() on platforms that support them. This turned out to be well
worth it (1.5 to 2 times faster than the previous version if the
result has less than 30 or 40 digits).

Regards,
Dean

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: partition routing layering in nodeModifyTable.c
Next
From: Noah Misch
Date:
Subject: Re: [HACKERS] WAL logging problem in 9.4.3?