| From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
|---|---|
| To: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
| Cc: | John Naylor <john(dot)naylor(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Non-decimal integer literals |
| Date: | 2022-11-23 08:56:15 |
| Message-ID: | CAApHDvqRjjQBFHi-c3MTmYrTQGArFx8-9z2vjug41JY5py32SQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 23 Nov 2022 at 21:54, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> I wonder if you'd be better off with something like:
>
> while (*ptr && isxdigit((unsigned char) *ptr))
> {
> if (unlikely(tmp & UINT64CONST(0xF000000000000000)))
> goto out_of_range;
>
> tmp = (tmp << 4) | hexlookup[(unsigned char) *ptr++];
> }
Here's a delta diff with it changed to work that way.
David
| Attachment | Content-Type | Size |
|---|---|---|
| more_efficient_hex_oct_and_binary_processing.diff | text/plain | 4.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2022-11-23 09:00:21 | Re: Operation log for major operations |
| Previous Message | David Rowley | 2022-11-23 08:54:25 | Re: Non-decimal integer literals |