pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Chao Li <li.evan.chao@gmail.com>
To: Masahiko Sawada <sawada.mshk@gmail.com>
Cc: Haibo Yan <tristan.yim@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Optimize UUID parse using SIMD
Date: Tue, 18 Aug 2026 08:17:15 +0800
Message-ID: <94F18ACE-15B6-43C4-88C4-F5DD98EDB11A@gmail.com> (raw )
In-Reply-To: <CAD21AoDpMR7=emNWSepAg6A1q-45S-epduDkEyR4Tt4TYgjkMQ@mail.gmail.com >
References: <CAD21AoCqeR4UQU77Q_yOMNNzJ7AVeiO5QZT+4HnzPm4Wm-e02Q@mail.gmail.com >
<CABXr29GAXiSsD+Y2-kbCxOnmvfA=xp8yfW5HLEVmpDN42BMBwQ@mail.gmail.com >
<CAD21AoAGKT8kj2tdYNq0xBnzicQkz5s=ctG2yx5xAKx-69C5YA@mail.gmail.com >
<CABXr29GkTK9RUqBuV9iK_mYKjjUu1sWg7j7ZB_wtQNv93Z0WYA@mail.gmail.com >
<CAD21AoC-M3HFaQ-DCXSKRgMceH=mDPXWdCSz22SG6HM=po-w5Q@mail.gmail.com >
<CABXr29Go2OGuFOoV57XeABbRDq9EdV4T9rL7PCrq84R2hoORAg@mail.gmail.com >
<CAD21AoB+gJALda3UPGvZMXAeFjF_4qrNoHVfwvF-uj8L19hnPA@mail.gmail.com >
<CABXr29Ej7f80skZWXmSJsJDehOxc5Wj1D7bapBYe5y2e+zif-A@mail.gmail.com >
<CAD21AoBVZTkg_E+Bam7Df6KgCur+rhBL9+hWZqR+YMsAoVgbxw@mail.gmail.com >
<93F6B685-C5DC-444D-A92D-0927A528C1B8@gmail.com >
<CAD21AoDAviFUHJA-wJ11X-yQAb3aVbrOyY3BBn_vfXk2q6arBA@mail.gmail.com >
<5A6326C9-25EC-4D07-99C2-DA490A7BC7ED@gmail.com >
<CAD21AoCdnT247tsEQ9uTNM7k7RfL-qbHRbcaCz5GEi70f2JR5A@mail.gmail.com >
<CAD21AoD9JLkXvNR0oqJk_2LLoa+cLC_UytyjA5A97g5R-07qvw@mail.gmail.com >
<CAD21AoDpMR7=emNWSepAg6A1q-45S-epduDkEyR4Tt4TYgjkMQ@mail.gmail.com >
> On Aug 18, 2026, at 06:20, Masahiko Sawada <sawada.mshk@gmail.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/
view thread (27+ messages) latest in thread
Message-ID: <94F18ACE-15B6-43C4-88C4-F5DD98EDB11A@gmail.com>
Permalink: ../94F18ACE-15B6-43C4-88C4-F5DD98EDB11A@gmail.com/
Also on: postgresql.org/message-id/94F18ACE-15B6-43C4-88C4-F5DD98EDB11A@gmail.com
copy link · copy postgr.es
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: pgsql-hackers@postgresql.org
Cc: li.evan.chao@gmail.com, sawada.mshk@gmail.com, tristan.yim@gmail.com
Subject: Re: Optimize UUID parse using SIMD
In-Reply-To: <94F18ACE-15B6-43C4-88C4-F5DD98EDB11A@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox