From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: refactoring - share str2*int64 functions |
Date: | 2019-08-28 07:13:09 |
Message-ID: | 20190828071309.GK1965@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Aug 28, 2019 at 08:51:29AM +0200, Fabien COELHO wrote:
> Here is an updated patch for the u?int64 conversion functions.
Thanks!
> I have taken the liberty to optimize the existing int64 function by removing
> spurious tests.
Which are?
> I have not created uint64 specific inlined overflow functions.
Why? There is a comment below ;p
> If it looks ok, a separate patch could address the 32 & 16 versions.
I am surprised to see a negative diff actually just by doing that
(adding the 32 and 16 parts will add much more code of course). At
quick glance, I think that this is on the right track. Some comments
I have on the top of my mind:
- It would me good to have the unsigned equivalents of
pg_mul_s64_overflow, etc. These are simple enough, and per the
feedback from Andres they could live in common/int.h.
- It is more consistent to use upper-case statuses in the enum
strtoint_status. Could it be renamed to pg_strtoint_status?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Fabien COELHO | 2019-08-28 07:50:44 | Re: refactoring - share str2*int64 functions |
Previous Message | Fabien COELHO | 2019-08-28 06:51:29 | Re: refactoring - share str2*int64 functions |