| From: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Haibo Yan <tristan(dot)yim(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Optimize UUID parse using SIMD |
| Date: | 2026-08-18 00:17:15 |
| Message-ID: | 94F18ACE-15B6-43C4-88C4-F5DD98EDB11A@gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> On Aug 18, 2026, at 06:20, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
>>>>
>>>
>>> I don't think the scan can be really unbounded. string_to_uuid()
>>> receives a cstring, so by the time it is called the caller has already
>>> walked or copied the whole string to produce it. So unless the
>>> unbounded scan can be reached in some path I have overlooked, I'd
>>> prefer to keep strlen() here. Happy to change it if you still think it
>>> is worth it.
>>
>> After more thoughts, while I still don't think the scan can be
>> unbounded, using strlen() would add an extra scan just to determine we
>> use hex_decode_safe(). I'll change it to use strnlen() instead.
>
> I've updated the patch accordingly. Please review it.
>
> Regards,
>
> --
> Masahiko Sawada
> Amazon Web Services: https://aws.amazon.com
> <v5-0001-Optimize-UUID-parse-using-SIMD.patch>
Thanks for updating the patch. V5 looks good to me.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2026-08-18 00:21:58 | Re: Fix CPU cost of right-semi and right-anti hash joins |
| Previous Message | Bharath Rupireddy | 2026-08-18 00:00:00 | Re: [Patch] Omit virtual generated columns from test_decoding output |